powered by
model.frame
lme4
subbars
Substitute safe chars (+) for specials (for use in model.frame) (Generalized from lme4's subbars function.)
sub_specials(term, specials = c("|", "||", "s"), keep_args = c(2, 2, 1))
a term or formula with specials replaced by + (and extra arguments dropped)
+
formula or term in a formula
names of specials to process
number of arguments to retain (matching specials)
specials
sub_specials( ~ (1|x) + (a + b || y) + s(a, b, c)) sub_specials(Reaction ~ s(Days) + (1 + Subject))
Run the code above in your browser using DataLab