harmonize_subjid | R Documentation |
Turns the subject ID columns of all datasets into a factor containing levels for all the subjects of the database. Avoid problems when joining tables, and some checks can be performed on the levels.
harmonize_subjid(datalist, preprocess = NULL, col_subjid = get_subjid_cols())
datalist |
a list of dataframes |
preprocess |
an optional function to modify the subject ID column, for example |
col_subjid |
the names of the columns holding the subject ID (as character) |
datalist, with subject id modified
db = edc_example()
db$db0 = head(db$db0, 10)
db$db0$SUBJID %>% head()
db = harmonize_subjid(db)
db$db0$SUBJID %>% head()
db = harmonize_subjid(db, preprocess=function(x) paste0("#", x))
db$db0$SUBJID %>% head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.