View source: R/helpers-assert.R
| assert_cols | R Documentation |
Low-level helpers for validating columns and keys or comparing schemas.
assert_cols(data, cols)
assert_key(data, by)
common_names(x, y)
duplicated_keys(data, by)
data, x, y |
A |
cols, by |
Character vectors naming columns. |
assert_cols() and assert_key() return their input invisibly.
common_names() returns a character vector. duplicated_keys()
returns a data frame of duplicated key combinations.
common_names(mtcars, iris)
assert_cols(mtcars, c("mpg", "hp"))
duplicated_keys(data.frame(id = c(1, 1, 2)), "id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.