Confirm that a column is in the data, and rename data to prepare that column for later use.
Source:R/format_vpc_input_data.R
standardize_column.RdConfirm that a column is in the data, and rename data to prepare that column for later use.
Arguments
- dat
An input data.frame or similar object
- cols
A list with an element for colname giving the name for colname in
dat.- colname
The name of the column (character scalar)
- coldesc
The description of the column (character scalar)
- what
The description of the data (typically "observed" or "simulated")
- default
A default value (scalar or vector) to use if the column is not found.