Export all data in a plpData object to CSV files
exportPlpDataToCsv(plpData, outputFolder)
An object of type plpData
.
The folder on the file system where the CSV files will be created. If the folder does not yet exist it will be created.
Created a set of CSV files in the output folder with all the data in the plplData object. This function is intended to be used for research into prediction methods. The following files will be created:
Listing all persons and their prediction periods. This file will have these fields: row_id (a unique ID per period), person_id, cohort_start_date, cohort_id, time (number of days in the window).
Listing all outcomes per period. This file will have these fields: row_id, outcome_id, outcome_count, time_to_event.
Either not exported or a file listing per outcome ID which windows had the outcome prior to the window and should therefore be removed prior to fitting the model. This object will have these fields: rowId, outcomeId.
Listing the baseline covariates per person in the cohorts. This is done using a sparse representation: covariates with a value of 0 are omitted to save space. The covariates file will have three columns: rowId, covariateId, and covariateValue.
A file describing the covariates that have been extracted.
Some information on how the plpData object was constructed.
# NOT RUN {
exportPlpDataToCsv(plpData, "s:/temp/exportTest")
# }
Run the code above in your browser using DataLab