colsCheck | R Documentation |
colsCheck
checks whether a data frame contains the specified columns. You can check for as many columns as you want, and the function will throw an informative error if any of them are missing (and it will tell you which ones) are missing. It will also check that obj
is a data frame.
colsCheck(obj, cols)
obj |
An object that you want to check for cols |
cols |
A vector of column names you want to check for |
Throws an informative error if any of cols
are missing from obj
. Additionally throws an error if obj
is not a data frame (see dfCheck()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.