sub_specials: Substitute safe chars (+) for specials (for use in...

sub_specialsR Documentation

Substitute safe chars (+) for specials (for use in model.frame) (Generalized from lme4's subbars function.)

Description

Substitute safe chars (+) for specials (for use in model.frame) (Generalized from lme4's subbars function.)

Usage

sub_specials(term, specials = c("|", "||", "s"), keep_args = c(2, 2, 1))

Arguments

term

formula or term in a formula

specials

names of specials to process

keep_args

number of arguments to retain (matching specials)

Value

a term or formula with specials replaced by + (and extra arguments dropped)

Examples

sub_specials( ~ (1|x) + (a + b || y) + s(a, b, c))
sub_specials(Reaction ~ s(Days) + (1 + Subject))

glmmTMB documentation built on Oct. 7, 2023, 5:07 p.m.