Learn R Programming

psycho (version 0.6.1)

find_combinations.formula: Generate all combinations of predictors of a formula.

Description

Generate all combinations of predictors of a formula.

Usage

# S3 method for formula
find_combinations(object, interaction = TRUE, fixed = NULL, ...)

Arguments

object

Formula.

interaction

Include interaction term.

fixed

Additional formula part to add at the beginning of each combination.

...

Arguments passed to or from other methods.

Value

list containing all combinations.

Examples

Run this code
# NOT RUN {
library(psycho)

f <- as.formula("Y ~ A + B + C + D")
f <- as.formula("Y ~ A + B + C + D + (1|E)")
f <- as.formula("Y ~ A + B + C + D + (1|E) + (1|F)")

find_combinations(f)
# }

Run the code above in your browser using DataLab