Compose and decompose interaction terms to and from their components
composeTerm(components)composeTerms(listOfComponents)
decomposeTerm(term)
decomposeTerms(terms)
a character vectors of components
a list of character vectors of components
a string with components separated with colons
a character vector of components separated with colons
# NOT RUN {
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')
# }
Run the code above in your browser using DataLab