Description Usage Arguments Details Value Examples
This function will edit column names of the file gotten from add*() function. It will append column names from crea.rep dataset first, and then customly add the names of the new column(s), depending on which file are you editing (BP, BMI or diabetes). It will also add the "formerge" column where it creates a identifier for merging. This column is created by simply pasting PatientID, event.date and CodeValue of the variable file.
1 2 | variableDataEditing(crea.dataset, variable.data = variable.data,
BPtype = NULL, toedit = c("BP", "BMI", "diabetes"))
|
crea.dataset |
dataset with creatinine ReadCodes, at least three creatinine measurements per patient. |
variable.data |
bmi, diabetes or blood pressure data gotten from one of the add*() functions in the package. |
BPtype |
a character string. E.g. "diastolic" or "systolic", or simply "D" and "S". How ever you type it, it will be converter to upper case. Default is NULL |
toedit |
A vector. Can be "BP", "BMI" or "diabetes". This will tell the function which file editing you want to do. |
If toedit="BP", you have to specify BPtype ("diastolic" or "systolic"). This will create a edited BP dataframe - it renames last two columns to BP code value and "Flag". Regardless of what you chose in the "toedit", function will also add the "formerge" column created for the purposes of merging all the variables to the final file. I suggest saving the final files as RDS (saveRDS(editeddiastolicfile, "path/to/file.rds")), as it uses less space and loads faster. The column used for time analysis is named "event.time".
it returns a edited crea-BMI, crea-diabetes, crea-diastolic BP or crea-systolic BP data frame.
1 2 3 4 5 | ## Not run:
editeddiastolicfile <- variableDataEditing(crea.rep, crea_dia.txt, BPtype="diastolic", toedit="BP")
editedBMIfile <- variableDataEditing(crea.rep, crea_dia.txt, toedit="BMI")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.