minor adjustments and bug fixing

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-21 11:18:38 +01:00
commit 40d95e41c3
No known key found for this signature in database
14 changed files with 256 additions and 71 deletions

View file

@ -75,10 +75,15 @@ Ensure, that the data set is formatted with as much information as possible.
`field.type` can be supplied
}
\examples{
\dontrun{
data <- REDCapCAST::redcapcast_data
data |> ds2dd_detailed()
## Basic parsing with default options
REDCapCAST::redcapcast_data |>
dplyr::select(-dplyr::starts_with("redcap_")) |>
ds2dd_detailed()
## Adding a record_id field
iris |> ds2dd_detailed(add.auto.id = TRUE)
## Passing form name information to function
iris |>
ds2dd_detailed(
add.auto.id = TRUE,
@ -86,6 +91,8 @@ iris |>
) |>
purrr::pluck("meta")
mtcars |> ds2dd_detailed(add.auto.id = TRUE)
## Using column name suffix to carry form name
data <- iris |>
ds2dd_detailed(add.auto.id = TRUE) |>
purrr::pluck("data")
@ -93,4 +100,3 @@ names(data) <- glue::glue("{sample(x = c('a','b'),size = length(names(data)),
replace=TRUE,prob = rep(x=.5,2))}__{names(data)}")
data |> ds2dd_detailed(form.sep = "__")
}
}