constructFormula: Construct a formula string

View source: R/utils.R

constructFormulaR Documentation

Construct a formula string

Description

Construct a formula string

Usage

constructFormula(dep = NULL, terms)

Arguments

dep

the name of the dependent variable

terms

list of character vectors making up the terms

Value

a string representation of the formula

Examples


constructFormula(terms=list('a', 'b', c('a', 'b')))
# a+b+a:b

constructFormula('f', list('a', 'b', c('a', 'b')))
# "f~a+b+a:b"

constructFormula('with spaces', list('a', 'b', c('a', 'b')))
'`with spaces`~a+b+a:b'


jmvcore documentation built on Aug. 15, 2023, 9:07 a.m.