docs and name update

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-18 14:41:44 +01:00
commit 9d53f84427
No known key found for this signature in database
7 changed files with 39 additions and 10 deletions

View file

@ -45,7 +45,7 @@ The more advanced `ds2dd_detailed()` is a natural development. It will try to ap
The dataset should be correctly formatted for the data dictionary to preserve as much information as possible.
```{r eval=TRUE}
```{r eval=FALSE}
d2 <- REDCapCAST::redcapcast_data |>
dplyr::mutate(record_id = seq_len(dplyr::n()),
region=factor(region)) |>

View file

@ -2,7 +2,7 @@
title: "REDCapCAST"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction}
%\VignetteIndexEntry{REDCapCAST}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

View file

@ -14,13 +14,34 @@ knitr::opts_chunk$set(
)
```
To make the easiest possible transition from spreadsheet/dataset to REDCap, I have created a small Shiny app, which adds a graphical interface to the casting of a data dictionary and data upload. Install the package and run the app as follows:
To make the easiest possible transition from spreadsheet/dataset to REDCap, I have created a small app, which adds a graphical interface to the casting of a data dictionary and data upload. Install the package and launch the app as follows:
```{r eval=FALSE}
require(REDCapCAST)
shiny_cast()
REDCapCAST::shiny_cast()
```
The app primarily wraps one function: `ds2dd_detailed()`.
```{r}
REDCap_split(
records = redcapcast_data,
metadata = redcapcast_meta,
forms = "all"
) |>
sanitize_split() |>
redcap_wider() |>
ds2dd_detailed()|>
purrr::pluck("data") |>
readr::type_convert(
col_types = readr::cols(.default = readr::col_guess()))
```
```{r}
redcapcast_data |>
dplyr::mutate(dplyr::across(dplyr::everything(),as.character)) |>
readr::type_convert(
col_types = readr::cols(.default = readr::col_guess()))
```
The app will launch in a new window and the interface should be fairly self-explanatory.
The app only provides the most basic functionality, but might be extended in the future.