iterms: Create a vector of interaction terms

Description Usage Arguments Value Examples

View source: R/radiant.R

Description

Create a vector of interaction terms

Usage

1
iterms(vars, nway, sep = ":")

Arguments

vars

Variables labels to use

nway

2-way (2) or 3-way (3) interactions labels to create

sep

Separator between variable names (default is :)

Value

Character vector of interaction term labels

Examples

1
2
3
paste0("var", 1:3) %>% iterms(2)
paste0("var", 1:3) %>% iterms(3)
paste0("var", 1:3) %>% iterms(2, sep = ".")

radiant-rstats/radiant.data documentation built on Nov. 13, 2018, 6:57 a.m.