Stop if column name is not present in the data
stopifnotcolumn.Rd
Similar in function to stopifnot but specific to a column name that you wish to double check if it is present in your data or not.
Arguments
- data
A data frame with column names.
- string
A character string that you want to know if it exists in the column names of
data
.
Value
TRUE
is invisibly returned if the column name is found and
an informative stop call is initiated if the column is not present.