load_excel.RdLoads an Excel workbook and ensures it contains all required sheets and columns for the Codey project. If any required sheets or columns are missing, they are added with default values. The function also renames a single-sheet workbook to "datafile", ensures the presence of an "ID" column in the datafile, and adds a "text_column" key to the meta sheet if missing. If any changes are made, the workbook is overwritten with the updated structure.
load_excel(x)A named list of data frames, one for each sheet in the workbook, with all required sheets and columns present.
The function expects the following sheets and columns:
datafile: No specific columns required, but ensures an "ID" column exists.
codebook: Columns "code", "definition".
codes: Columns "code", "regex".
meta: Columns "key", "value". Adds "text_column" key if missing.
rated_codey: Column "ID".
tracking: Columns "key", "value", "timestamp".
If the workbook contains only one sheet, it is renamed to "datafile".