add_auto_columns | R Documentation |
Add columns to a table using a hash of other columns, as defined in a data model
add_auto_columns(table, table_name, model, nchar = 8, error_on_missing = TRUE)
hash_id(x, nchar = 8)
table |
Data table to import (tibble or data.frame) |
table_name |
Name of data table in model |
model |
|
nchar |
number of characters in the resulting strings (max 32) |
error_on_missing |
Logical for whether to throw an error if any columns necessary to create another column are missing. If FALSE, the function will issue a warning but proceed without adding the column. |
x |
string use to create hash |
Automatically generated hashed identifiers based on the values of
other columns in table
. model
should have an attribute
auto_id
containing a vector of columns to be used.
table
with additional columns
identifier based on a hash of x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.