mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-22 13:30:23 +01:00
new vignettes
This commit is contained in:
parent
767d03f45f
commit
409d53a6be
@ -1,8 +1,8 @@
|
||||
---
|
||||
title: "Database casting"
|
||||
title: "Database-creation"
|
||||
output: rmarkdown::html_vignette
|
||||
vignette: >
|
||||
%\VignetteIndexEntry{Database casting}
|
||||
%\VignetteIndexEntry{Database-creation}
|
||||
%\VignetteEngine{knitr::rmarkdown}
|
||||
%\VignetteEncoding{UTF-8}
|
||||
---
|
||||
@ -22,17 +22,17 @@ library(REDCapCAST)
|
||||
|
||||
THe first iteration of a dataset to data dictionary function is the `ds2dd()`, which creates a very basic data dictionary with all variables stored as text. This is sufficient for just storing old datasets/spreadsheets securely in REDCap.
|
||||
|
||||
```{r}
|
||||
```{r eval=FALSE}
|
||||
mtcars |>
|
||||
dplyr::mutate(record_id = seq_len(dplyr::n())) |>
|
||||
ds2dd()
|
||||
ds2dd() |> str()
|
||||
```
|
||||
|
||||
The more advanced `ds2dd_detailed()` is a natural development. It will try to apply the most common data classes for data validation and will assume that the first column is the id number. It outputs a list with the dataset with modified variable names to comply with REDCap naming conventions and a data dictionary.
|
||||
|
||||
The dataset should be correctly formatted for the data dictionary to preserve as much information as possible.
|
||||
|
||||
```{r}
|
||||
```{r eval=FALSE}
|
||||
dd_ls <- mtcars |>
|
||||
dplyr::mutate(record_id = seq_len(dplyr::n())) |>
|
||||
dplyr::select(record_id, dplyr::everything()) |>
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
title: "Introduction"
|
||||
title: "Shiny-app"
|
||||
output: rmarkdown::html_vignette
|
||||
vignette: >
|
||||
%\VignetteIndexEntry{Introduction}
|
||||
%\VignetteIndexEntry{Shiny-app}
|
||||
%\VignetteEngine{knitr::rmarkdown}
|
||||
%\VignetteEncoding{UTF-8}
|
||||
---
|
||||
@ -20,7 +20,7 @@ library(REDCapCAST)
|
||||
|
||||
To make the easiest possible transistion 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:
|
||||
|
||||
```{r}
|
||||
```{r eval=FALSE}
|
||||
require(REDCapCAST)
|
||||
shiny_cast()
|
||||
```
|
Loading…
Reference in New Issue
Block a user