diff --git a/vignettes/Database creation.Rmd b/vignettes/Database-creation.Rmd similarity index 95% rename from vignettes/Database creation.Rmd rename to vignettes/Database-creation.Rmd index 088fa8b..c226385 100644 --- a/vignettes/Database creation.Rmd +++ b/vignettes/Database-creation.Rmd @@ -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()) |> diff --git a/vignettes/Shiny casting.Rmd b/vignettes/Shiny-app.Rmd similarity index 90% rename from vignettes/Shiny casting.Rmd rename to vignettes/Shiny-app.Rmd index c2c1629..f379153 100644 --- a/vignettes/Shiny casting.Rmd +++ b/vignettes/Shiny-app.Rmd @@ -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() ```