Assert Data Frame Has Column
assert_dataframe_has_column.RdValidates that the provided data frame contains the specified column. It uses pre-existing checks to validate the data frame and the parameter name, then verifies that the given column exists in the data frame.
Value
This function does not return a value. It stops execution with an error message if the validations fail or if the column is not present.
Examples
if (FALSE) { # \dontrun{
df <- data.frame(a = 1:5, b = 6:10)
assert_dataframe_has_column(df, "a")
} # }