This commit is contained in:
Andreas Gammelgaard Damsbo 2024-02-27 13:20:21 +01:00
commit 9e33057c06
32 changed files with 456 additions and 340 deletions

View file

@ -25,7 +25,8 @@ THe first iteration of a dataset to data dictionary function is the `ds2dd()`, w
```{r eval=FALSE}
mtcars |>
dplyr::mutate(record_id = seq_len(dplyr::n())) |>
ds2dd() |> str()
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.
@ -37,7 +38,8 @@ dd_ls <- mtcars |>
dplyr::mutate(record_id = seq_len(dplyr::n())) |>
dplyr::select(record_id, dplyr::everything()) |>
ds2dd_detailed()
dd_ls |> str()
dd_ls |>
str()
```
Additional specifications to the DataDictionary can be made manually, or it can be uploaded and modified manually in the graphical user interface on the web page.