constructFormula: Construct a formula string

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Construct a formula string

Usage

1

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

1
2
3
4
5
6
7
8
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 Feb. 6, 2020, 5:07 p.m.