Detect whether there are any 'specials' in a formula term
anySpecial(term, specials = findReTrmClasses(), fast = FALSE)
logical value
## should only detect s as the head of a function, s(...)
anySpecial(~diag(1))
#> [1] TRUE
anySpecial(~diag)
#> [1] FALSE
anySpecial(~diag[[1]])
#> [1] FALSE
anySpecial(~diag[1])
#> [1] FALSE
anySpecial(~s)
#> [1] FALSE
anySpecial(~s(hello+goodbye,whatever))
#> [1] TRUE