Description Usage Arguments Value Note Examples
View source: R/LinRegInteractive_functions.R
All levels of the factors from a data.frame
provided are combined, each combination of factor levels is referred to as group.
1 | factorCombinations(X, factor.sep = "|", level.sep = ".", count=TRUE)
|
X |
A |
factor.sep |
Character by which the factor-factor level combinations are separated in the group names. |
level.sep |
Character by which the level names are separated from the corresponding factor names in the group names. |
count |
Should the occurences of the different groups in the |
A list with the following components:
combinations |
A data frame containing every combination of factor levels (groups) for the factors provided. |
names |
A character vector with the names of the groups. Factor-factor level combinations are separated by |
counts |
If |
Function is mainly for internal use in LinRegInteractive but may be useful for other purposes as well.
1 2 3 4 5 6 7 | # multiple factors
data("CO2")
print(factorCombinations(CO2))
# single factor
data("chickwts")
print(factorCombinations(chickwts))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.