View source: R/ft_generate_tbls.R
ft_generate_tbls | R Documentation |
This function provides a wrapper around ft_generate_xtab()
, ft_generate_xtab_3way()
, and ft_generate_topline()
(all internal), allowing users to efficiently generate many tables by passing a list of arguments. The shapes of
the argument lists may vary depending on the table type
.
ft_generate_tbls(l, df, weight, type = "topline")
l |
A list of arguments to be passed on to either
|
df |
A data frame or tibble. |
weight |
A length one character vector used as the caption for the topline. |
type |
Must either be 'topline', 'crosstab_2way', or 'crosstab_3way'. Defaults to 'topline'. |
A list containing elements that are list objects, each of which is the source code for a single
s3
list object of class flextable
.
ft_generate_xtab()
, ft_generate_xtab_3way()
, and ft_generate_topline()
for single 'Feeling Thermometer' crosstab or topline generations.
# Generate crosstabs list_of_xtabs <- ft_generate_tbls( l = list_xtab, df, "weight", "crosstab_2way" ) #' list_of_xtabs <- ft_generate_tbls( l = list_xtab, df, "weight", "crosstab_3way" ) # Generate toplines list_of_topline <- ft_generate_tbls( l = list_topline, df, "weight", "topline" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.