Arguments
- path
Path to the
.xlsxfile (typically afileInput()temp path or the bundled example, obtained viazhn_example_path()).- sheet
Optional sheet name to override the canonical/regex resolver.
- verbose
Logical; emit a
cli_informwhen duplicate columns are detected.
Value
A cohort_df S3 object (inheriting from
data.frame) with cleaned names, an added integer behandlungsjahr
column, and a "sheet_to_use" attribute. Empty input workbooks return
a 0-row object.
Details
Reads the primary cohort sheet from a tumour-documentation workbook,
cleans column names via janitor::clean_names(), drops trailing empty
none* columns, and derives a behandlungsjahr (treatment year)
column from the first available date column.
Replaces the legacy read_main_data() from v5 which scanned ~/Desktop
for Daten.xlsx. The package never reads ~/Desktop.
See also
Other readers:
zhn_read_diagnostics(),
zhn_read_therapy(),
zhn_read_tumorboard()
Examples
if (interactive()) {
df <- zhn_read_cohort(zhn_example_path())
head(df)
}