The importExcel Package
The importExcel package has only one exported function: read_excel_with_dictionary
This function performs the following tasks:
- reads in the data sheet
- reads in the dictionary sheet
(these must be in the same Excel file)
- applies any variable recodings specified in the dictionary
- adds labels to the variables
- attempts to harmonise messy date columns
The function returns an object with four elements:
- the recoded data
- a list of values omitted from numeric columns
- a list of converted dates (if multiple formats were present in columns)
- the dictionary used to convert the data (without excluded columns and ensuring non-duplicate variable names)