template_field_types {daiquiri} | R Documentation |
Print a template field_types() specification to console
Description
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()
.
Usage
template_field_types(df, default_field_type = ft_ignore())
Arguments
df |
data frame including the column names for the template specification |
default_field_type |
|
Value
(invisibly) Character string containing the template code
See Also
Examples
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())
[Package daiquiri version 1.1.1 Index]