Description Usage Arguments Value Examples
Value-Domains For Columns in Table Designs
1 | values(domain, value)
|
domain |
name or id of the domain. |
value |
values that the |
a data.frame
of class "tabde_values"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | vals <- values(
c("letters", "letters", "numbers"),
c("a", "b", 2)
)
td <- tabde(
col_name = c("Alpha", "Num"),
col_type = c("character", "numeric"),
col_domain = c("letters", "numbers")
)
df <- data.frame(
Alpha = c("a", "b", "c"),
Num = c(2, 2, 3),
stringsAsFactors = FALSE
)
# Fails because df contains values not in `vals`:
matches_tabde(df, td, values = vals)
# Ok:
matches_tabde(df[1:2, ], td, values = vals)
# domains are only checked if `values` is passed to matches_tabde
matches_tabde(df, td)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.