powered by
Create a vector of interaction terms
iterms(vars, nway, sep = ":")
Variables lables to use
2-way (2) or 3-way (3) interactions labels to create
Separator between variable names (default is :)
Character vector of interaction term labels
# NOT RUN { paste0("var", 1:3) %>% iterms(2) paste0("var", 1:3) %>% iterms(3) paste0("var", 1:3) %>% iterms(2, sep = ".") # }
Run the code above in your browser using DataLab