Skip to contents

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 tibble produced by read_redcap_formatted.

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))