Add terms to a formula
Add terms to a formula
add.terms(formula, add)
formula |
The formula to add terms to. |
add |
A vector of terms to add. To add terms nested in random-effect groups, use ‘(term|group)’ syntax if you want to add an independent random effect (e.g. ‘(olderterm|group) + (term|group)’), or use ‘term|group’ syntax if you want to add a dependent random effect to a pre-existing term group (if no such group exists, it will be created at the end of the formula). |
The updated formula.
library(buildmer) form <- Reaction ~ Days + (1|Subject) add.terms(form,'Days|Subject') add.terms(form,'(0+Days|Subject)') add.terms(form,c('many','more|terms','to|terms','(be|added)','to|test'))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.