Name Objects

DESCRIPTION:

Creates and tests for objects of mode name. Name objects are primarily used in the parsed form of expressions to represent names typed by the user.

USAGE:

as.name(x) 
is.name(x) 
as.symbol(x) 
is.symbol(x) 

REQUIRED ARGUMENTS:

x
a S-PLUS object.

VALUE:

as.name coerces x to an object of mode "name". This is useful when x is of mode "character".

is.name tests whether x is a name object. That is, it returns TRUE if x is a name and FALSE otherwise.

DETAILS:

Both of these functions are generic; currently there are no methods defined for either of them.

NOTE:

The use of the word "name" here is different than in the names of a list or vector - see names for this sense. The functions is.symbol and as.symbol are identical to is.name and as.name, respectively: they are present for compatibility with R.

SEE ALSO:

, , .

EXAMPLES:

mode(eval(as.name("ls"))) # returns "function"