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

View source: R/utils.R

composeTermR Documentation

Compose and decompose interaction terms to and from their components

Description

Compose and decompose interaction terms to and from their components

Usage

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

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')


jamovi/jmvcore documentation built on Jan. 11, 2024, 4:17 a.m.