transformToSummarisedResult {omopgenerics} | R Documentation |
Create a <summarised_result> object from a data.frame, given a set of specifications.
Description
Create a <summarised_result> object from a data.frame, given a set of specifications.
Usage
transformToSummarisedResult(
x,
group = character(),
strata = character(),
additional = character(),
estimates = character(),
settings = character()
)
Arguments
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. |
Value
A <summarised_result> object.
Examples
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")
)
[Package omopgenerics version 1.2.0 Index]