decomposeTerm: Compose and decompose interaction terms to and from their...

Description Usage Arguments Examples

View source: R/utils.R

Description

Compose and decompose interaction terms to and from their components

Usage

1
2
3
4
5
6
7
composeTerm(components)

composeTerms(listOfComponents)

decomposeTerm(term)

decomposeTerms(terms)

Arguments

components

a character vectors of components

listOfComponents

a list of character vectors of components

term

a string with components separated with colons

terms

a character vector of components separated with colons

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
composeTerm(c('a', 'b', 'c'))
# 'a:b:c'

composeTerm(c('a', 'b', 'with space'))
# 'a:b:`with space`'

decomposeTerm('a:b:c')
# c('a', 'b', 'c')

decomposeTerm('a:b:`with space`')
# c('a', 'b', 'with space')

jmvcore documentation built on Feb. 6, 2020, 5:07 p.m.