View source: R/classSummarisedResult.R
transformToSummarisedResult | R Documentation |
Create a <summarised_result> object from a data.frame, given a set of specifications.
transformToSummarisedResult(
x,
group = character(),
strata = character(),
additional = character(),
estimates = character(),
settings = character()
)
x |
A data.frame. |
group |
Columns in x to be used in group_name-group_level formatting. |
strata |
Columns in x to be used in strata_name-strata_level formatting. |
additional |
Columns in x to be used in additional_name-additional_level formatting. |
estimates |
Columns in x to be formatted into: estimate_name-estimate_type-estimate_value. |
settings |
Columns in x thta form the settings of the <summarised_result> object. |
A <summarised_result> object.
x <- dplyr::tibble(
cohort_name = c("cohort1", "cohort2"),
variable_name = "age",
mean = c(50, 45.3),
median = c(55L, 44L)
)
transformToSummarisedResult(
x = x,
group = c("cohort_name"),
estimates = c("mean", "median")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.