R has many helpers for testing object type, e.g. is.character(x)
Is there an equivalent for the (strangely missing) is.formula(x)
?
(PS: I see that at least one package has implemented this outside base R)
From my comment, you could just do:
is.formula <- function(x){
inherits(x,"formula")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With