template_field_types | R Documentation |
Helper function to generate template code for a field_types()
specification,
based on the supplied data frame. All fields (columns) in the specification
will be defined using the default_field_type
, and the console output can be
copied and edited before being used as input to daiquiri_report()
or prepare_data()
.
template_field_types(df, default_field_type = ft_ignore())
df |
data frame including the column names for the template specification |
default_field_type |
|
(invisibly) Character string containing the template code
field_types()
df <- data.frame(
col1 = rep("2022-01-01", 5),
col2 = rep(1, 5),
col3 = 1:5,
col4 = rnorm(5)
)
template_field_types(df, default_field_type = ft_numeric())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.