split_redcap_dataset {DescrTab2} | R Documentation |
Split a dataset imported from Redcap into convenient subsets
Description
This function seperates a datasets into three parts: "Singular" data, which is the
data from non-repeating instruments. "missings_everywhere", which is data which is missing for each row.
The last parts are all the repeating instruments, which are referred to by their name as recorded in
dat$redcap_repeat_instrument
.
Usage
split_redcap_dataset(dat, id_name = "patid")
Arguments
dat |
a |
id_name |
(character) the name of the subject ID variable. |
Value
a list of datasets separated into the categories as described
Examples
path_to_redcap_script <- system.file("examples", "testredcap.r", package = "DescrTab2")
dat <- read_redcap_formatted(path_to_redcap_script)
d <- split_redcap_dataset(dat, guess_ID_variable(dat, TRUE))
[Package DescrTab2 version 2.1.16 Index]