View source: R/utility_functions.R
all_names_present | R Documentation |
Given a character vector, checks if all names are present in names(data)
.
Throws error if stops=TRUE
, else returns FALSE
if some variable name is not present.
all_names_present(data, var.names, stops = TRUE, msg = NULL)
data |
dataset where the variable names should be found |
var.names |
a character vector of variable names, e.g.
|
stops |
logical, stop returns exception |
msg |
Custom message to return instead of default message.
Special: include |
'TRUE' if all 'var.names' are in 'data', else 'FALSE',
Joonas Miettinen
robust_values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.