name {base} | R Documentation |
as.symbol
coerces its argument to be a symbol, or
equivalently, a name. The argument must
be of mode "character"
. as.name
is an
alias for as.symbol
.
is.symbol
(and is.name
equivalently) returns TRUE
or FALSE
depending on whether its argument is a symbol
(i.e. name) or not.
as.symbol(x) is.symbol(y) as.name(x) is.name(y)
x, y |
objects to be coerced or tested. |
is.symbol
is generic: you can write methods to handle
of specific classes of objects, see InternalMethods.
The term ``symbol'' is from the lisp background of R, whereas ``name'' has been the standard S term for this.
call
, is.language
. For the internal
object mode, typeof
.
an <- as.name("arrg") is.name(an) # TRUE str(an)# symbol