as_inline | R Documentation |
Convert table data to inline list
as_inline(data, tbl_variables, tbl_values)
data |
a data frame. |
tbl_variables |
column names that will be used to form groups in the table |
tbl_values |
column names that contains table values. |
a list of tbl_values
values for each permutation of tbl_variables
variables in tbl_variables
that have missing values will be
have their missing values converted into an explicit category named
variable_missing, where 'variable' is the name of the variable.
example_data <- data.frame(
sex = c("female", "male"),
height = c("158 (154 - 161)", "178 (175 - 188)")
)
as_inline(example_data, tbl_variables = 'sex', tbl_values = 'height')
car_data <- mtcars
car_data$car_name <- rownames(mtcars)
as_inline(car_data, tbl_variables = 'car_name', tbl_values = 'mpg')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.