This utility extends the lookup table to include:
n_id
the number of patients present in the datasetrows_per_id
the mean number of row per patientcrfname
the actual name of the dataset
Usage
extend_lookup(
lookup,
...,
id_cols = get_subjid_cols(lookup),
crf_cols = get_crfname_cols(lookup),
datasets = get_datasets(lookup, envir = parent.frame())
)
Arguments
- lookup
[
data.frame(1)
]
the lookup table- ...
unused
- id_cols, crf_cols
[
character(n)
]
for experts only- datasets
[
data.frame(n)
]
for experts only
Examples
#tm = read_trialmaster("filename.zip", pw="xx")
tm = edc_example_mixed()
#> Warning: Option "edc_lookup" has been overwritten.
load_list(tm)
.lookup
#> # A tibble: 3 × 5
#> dataset nrow ncol names labels
#> <chr> <dbl> <dbl> <named list> <named list>
#> 1 short 100 4 <chr [4]> <chr [4]>
#> 2 long_mixed 200 5 <chr [5]> <chr [5]>
#> 3 long_pure 300 4 <chr [4]> <chr [4]>
.lookup = extend_lookup(.lookup)
.lookup
#> # A tibble: 3 × 8
#> dataset nrow ncol n_id rows_per_id crfname names labels
#> <chr> <dbl> <dbl> <int> <dbl> <chr> <named list> <named list>
#> 1 long_pure 300 4 100 3 long_pure <chr [4]> <chr [4]>
#> 2 long_mixed 200 5 100 2 long_mixed <chr [5]> <chr [5]>
#> 3 short 100 4 100 1 short <chr [4]> <chr [4]>