pullFakeId | R Documentation |
Replace IDs with de-identified version pulled from a crosswalk.
pullFakeId( dat, xwalk, firstCols = NULL, orderBy = NULL, uniq.id = "subject_uid" )
dat |
a data.frame |
xwalk |
a data.frame providing linkage for each ID, e.g. output from |
firstCols |
name of columns to put at front of output data set |
orderBy |
name of columns used to reorder output data set |
uniq.id |
character string indicating subject-level id variable (default is "subject_uid") |
The modified data.frame
demo_data <- data.frame(subj_id=c(4.1,4.2,5.1,6.1), pat_id=c(14872,14872,24308,37143), gender=c(1,1,0,1), weight=c(34,42,28,63), height=c(142,148,120,167)) # crosswalk w/ same format as idCrosswalk() output xwalk <- data.frame(subj_id=c(4.1,4.2,5.1,6.1), pat_id=c(14872,14872,24308,37143), mod_visit=c(1,2,1,1), mod_id=c(1,1,2,3), mod_id_visit=c(1.1,1.2,2.1,3.1)) demo_data_deident <- pullFakeId(demo_data, xwalk, firstCols = c('mod_id','mod_id_visit','mod_visit'), uniq.id='pat_id')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.