anySpecial: Detect whether there are any 'specials' in a formula term

anySpecialR Documentation

Detect whether there are any 'specials' in a formula term

Description

Detect whether there are any 'specials' in a formula term

Usage

anySpecial(term, specials = findReTrmClasses(), fast = FALSE)

Arguments

term

formula term

specials

values to detect

fast

(logical) use quick (syntactic) test for presence of specials?

Value

logical value

Examples

## should only detect s as the head of a function, s(...)
anySpecial(~diag(1))
anySpecial(~diag)
anySpecial(~diag[[1]])
anySpecial(~diag[1])
anySpecial(~s)
anySpecial(~s(hello+goodbye,whatever))

reformulas documentation built on Nov. 3, 2024, 9:07 a.m.