Learn R Programming

EDCimport (version 0.6.0)

edc_split_mixed: Split mixed datasets

Description

Split mixed tables, i.e. tables that hold both long data (N values per patient) and short data (one value per patient, duplicated on N lines), into one long table and one short table.

Usage

edc_split_mixed(
  database,
  datasets = everything(),
  ...,
  ignore_cols = NULL,
  verbose = FALSE
)

Value

an edc_database object

Arguments

database

an edc_database object, from read_trialmaster() or other EDCimport reading functions.

datasets

<tidy-select> datasets to split in the database

...

not used, ensure arguments are named

ignore_cols

columns to ignore in long tables. Default to getOption("edc_cols_crfname", "CRFNAME"). Case-insensitive. Avoid splitting tables for useless columns.

verbose

whether to print informations about the process.

Examples

Run this code
#db = read_trialmaster("filename.zip", pw="xx")
db = edc_example() %>% 
  edc_split_mixed(c(ae, starts_with("long")), 
                  ignore_cols="crfstat")
  
names(db)
edc_lookup()

db$ae #`aesoc`, `aegr`, and `sae` are long, but `n_ae` is short

db$ae_short
db$ae_long

Run the code above in your browser using DataLab