View source: R/get_comparisons.R
get_comparisons | R Documentation |
Create a list of possible pairwise comparisons between groups. If a reference group is specified, only comparisons against reference will be kept.
get_comparisons(data, variable, ref.group = NULL)
data |
a data frame |
variable |
the grouping variable name. Can be unquoted. |
ref.group |
a character string specifying the reference group. Can be unquoted. If numeric, then it should be quoted. If specified, for a given grouping variable, each of the group levels will be compared to the reference group (i.e. control group). If |
a list of all possible pairwise comparisons.
# All possible pairwise comparisons ToothGrowth %>% get_comparisons("dose") # Comparisons against reference groups ToothGrowth %>% get_comparisons("dose", ref.group = "0.5") # Comparisons against all (basemean) ToothGrowth %>% get_comparisons("dose", ref.group = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.