name
Names and Symbols

Description

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

Usage

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

Arguments

x any object.

Details

as.name and as.symbol are identical. is.name and is.symbol are identical. They are present for compatibility with R.
Value
as.name and as.symbolreturn an object of mode/class "name", coerced from x. The returned object x's type is displayed as "symbol" when you call typeof(x). This is useful when x is of mode "character".
is.name and is.symbolreturn TRUE if x is a name and FALSE otherwise.
Note
We use the word "name" here differently than that for the names of a list or a vector. See names for a description of that usage.
See Also
eval, call, names, typeof.
Examples
mode(eval(as.name("ls"))) # returns "function" 
xan <- as.name("xyz")
typeof(xan)   # returns "symbol"
mode(xan)  # returns "name"
class(xan) # returns "name"
is.name(xan) #  TRUE

Package base version 6.1.1-7
Package Index