Description Usage Arguments Value Examples
A function that check if column
is one of df
's
columns and returns an error message if not.
1 | column_in_dataframe(df, column, error_message = NULL, call_ = F)
|
df |
List/Data frame |
column |
Character: A column name |
error_message |
Character: user-defined error message |
call_ |
Logical: logical, indicating if the call should become part of
the error message. See |
Error message if test fails
1 2 3 4 5 6 | test_df <- data.frame(a = 1:10, b = 11:20)
column_in_dataframe(test_df, 'a')
## Not run:
column_in_dataframe(test_df, 'c')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.