Learn R Programming

jmvcore (version 2.6.3)

composeFormula: Compose a formula string

Description

Compose a formula string

Usage

composeFormula(lht, rht)

Value

a string representation of the formula

Arguments

lht

list of character vectors making up the left

rht

list of character vectors making up the right

Examples

Run this code

composeFormula(list('a', 'b', c('a', 'b')))
# ~a+b+a:b

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

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

Run the code above in your browser using DataLab