Is an Object a Language Object?

Usage

is.language(x)

Description

is.language returns TRUE if x is either a variable name, a call, or an expression.

Examples

ll <- list(a=expression(x^2 - 2*x + 1), b= as.name("Jim"),
	   c=as.expression(exp(1)), d=call("sin",pi))
sapply(ll, typeof)
sapply(ll, mode)
sapply(ll, is.language)# all TRUE


[Package Contents]