powered by
Detect whether there are any 'specials' in a formula term
anySpecial(term, specials = findReTrmClasses(), fast = FALSE)
logical value
formula term
values to detect
(logical) use quick (syntactic) test for presence of specials?
## 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))
Run the code above in your browser using DataLab