View source: R/generate_topline.R
generate_topline | R Documentation |
This function takes a data frame or a tibble object, a variable of interest, and a string
caption, returning a list object that is an instance of class flextable
. The function
implements data masking internally so users must specify data variables as strings
(i.e. use "x", "weight").
generate_topline(df, x, weight, caption)
df |
A data frame or tibble. |
x |
A single string of variable name. |
weight |
A single string of the weighting variable. |
caption |
A length one character vector used as the caption for the topline. |
A list object, which is an object of class flextable
.
# Generate a topline df %>% generate_topline(df = ., "x_var", "weight", "X")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.