check whether an object belongs to a formula class
is.formula(x)
x
an R object
TRUE/FALSE
Federico Blasi