Description Usage Arguments Details Value Examples
View source: R/matches_tabde.R
If a columns has the col_type
NA
in the table_design
, it will
be checked if the column is present in x
, but the column type can be
arbitrary.
1 2 3 4 5 6 7 | matches_tabde(
x,
table_design,
skip = "#skip",
values = NULL,
check_nulls = FALSE
)
|
x |
a |
table_design |
a table_design |
skip |
|
values |
a values Object. If |
check_nulls |
|
If used with assertthat, matches_tabde()
produces verbose error
messages.
logical
scalar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | td <- get_tabde(iris)
matches_tabde(iris, td)
matches_tabde(cars, td)
# Nice error messages with assertthat
if (requireNamespace("assertthat", quietly = TRUE)){
try(assertthat::assert_that(matches_tabde(cars, td)))
}
td <- get_tabde_sql(iris)
td$sql_opts <- "NOT NULL"
x <- iris
x$Species[1] <- NA
matches_tabde(x, td)
matches_tabde(x, td, check_nulls = TRUE)
# Nice error messages with assertthat
if (requireNamespace("assertthat", quietly = TRUE)){
try(assertthat::assert_that(matches_tabde(x, td, check_nulls = TRUE)))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.