View source: R/ProcessdfDefinitions.R
ProcessDfDefinitions | R Documentation |
This function processes a tsv file with definitions and is automtically performed in CreateUKBiobankPhentoypes(). #It can be usefull to run this function as a check prior to running CreateUKBiobankPhentoypes
ProcessDfDefinitions(
df,
VctAllColumns = c("TS(Touchscreen)", "ICD10", "ICD9", "OPCS4", "OPCS3", "READ2",
"READ2_drugs", "CTV3", "BNF", "DMD", "f.20001(sr_cancer)", "f.20002(sr_noncancer)",
"f.20003(sr_med)", "f.20004(sr_oper)"),
VctColstoupper = c("ICD10", "ICD9", "OPCS4", "OPCS3"),
fill_dependencies = T
)
df |
definition table as dataframe |
VctAllColumns |
character vector containing all column names of interest (as shown in table) where preprocessing is performed |
VctColstoupper |
character vector containing all column names without brackets for which the characters in columns will be converted to uppercase. |
fill_dependencies |
For composite traits whether to further process dependencies in Include_definitions/Exclude_from_cases/Study_population/Exclude_from_controls columns, default: TRUE |
processed definitiion table as dataframe
dfDefinitions_processed <- ProcessDfDefinitions(fread("definitions.tsv", colClasses = 'character', data.table = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.