Brown_cut: Create a state column that cuts light levels into sections by Brown et al.
(2022)
Description
This is a convenience wrapper arount cut() and dplyr::mutate(). It
creates a state column dividing a light column into recommended levels by
Brown et al. (2022). Cuts can be adjusted or extended with vector_cuts and
vector_labels
The input dataset with an additional (or overwritten) column
containing a cut light vector
Arguments
dataset
A light exposure dataframe
MEDI.colname
The colname containing melanopic EDI values (or,
alternatively, Illuminance). Defaults to MEDI. Expects a symbol.
New.state.colname
Name of the new column that will contain the cut
data. Expects a symbol.
vector_cuts
Numeric vector of breaks for the cuts.
vector_labels
Vector of labels for the cuts. Must be one entry shorter
than vector_cuts. "default" will produce nice labels for the default
setting of vector_cuts (and throw an error otherwise).
overwrite
Logical. Should the New.state.colname overwrite a
preexisting column in the dataset