3.1 importExcelData

The importExcelData function is a wrapper function that will create a log file, read in the data dictionary and the data, check the variable ranges, create factor variables and create any survival variables, recoded variables or categorised variables specified in the data dictionary. Steps and calculations are recorded in the log file, and checks are provided to make sure that variables are recoded and calculated properly.

Syntax

import <- importExcelData(excelFile = 'C:/Users/lisa/OneDrive - UHN/reportRxTestData/testData.xlsm', dictionarySheet='DataDictionary',dataSheet='DataEntry',saveWarnings=FALSE,setErrorsMissing=TRUE,timeUnit='month')

The timeUnit argument applies only to calculated survival variables.

The data and data dictionary objects can then be extracted:

data <- import$data

dict <- import$dictionary

The log file will be created in the same directory as the data file.