Check variables in a data frame are valid character or factor.
assert_valid_variable(
df,
vars,
label = deparse(substitute(df)),
types = NULL,
...
)
invisible TRUE
or an error message if the criteria are not fulfilled.
(data.frame
) input dataset.
(character
) variables to check.
(string
) labels of the data frame.
Named (list
) of type of the input.
further arguments for assert_valid_var
. Please note that different methods have different arguments
so if provided make sure the variables to check is of the same class.