In R, is there a function that will return TRUE if its argument has type language and FALSE otherwise?
The is.language function does not satisfy this because it will return TRUE for arguments of type symbol or expression as well. Obviously, I could simple check that the type of the argument is is language using something like typeof(x) == 'language' or write my own function, but it seems odd that R wouldn't already have its own function for this purpose because most types in R have an associated is-type function specific to those types.
The only object of type language that is not a name/symbol or expression is a call, for which you can use is.call.
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