Confirm that a column is in the data, and rename data to prepare that column for later use.
standardize_column(dat, cols, colname, coldesc, what, default)If colname is already named colname in dat,
dat unchanged. If not, check if dat has that column name
already, and if so, name the existing dat[[colname]] to
dat[[paste0(colname, ".old")]] and then rename
cols[[colname]] to colname.
An input data.frame or similar object
A list with an element for colname giving the name for colname in
dat.
The name of the column (character scalar)
The description of the column (character scalar)
The description of the data (typically "observed" or "simulated")
A default value (scalar or vector) to use if the column is not found.