checkColumns | R Documentation |
Check data.frame for valid columns and issue message if invalid
checkColumns(data, columns, logic = c("all", "any"))
data |
data.frame to check. |
columns |
vector of column names to check. |
logic |
one of |
TRUE
if columns are valid and a string message if not.
df <- data.frame(A=1:3, B=4:6, C=rep(NA, 3))
checkColumns(df, c("A", "B"), logic="all")
checkColumns(df, c("A", "B"), logic="any")
checkColumns(df, c("A", "C"), logic="all")
checkColumns(df, c("A", "C"), logic="any")
checkColumns(df, c("A", "D"), logic="all")
checkColumns(df, c("A", "D"), logic="any")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.