This help topic is for R version 1.7.1. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/name.html
name {base}R Documentation

Variable Names or Symbols, respectively

Description

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.

Usage

as.symbol(x)
is.symbol(y)

as.name(x)
is.name(y)

Arguments

x, y

objects to be coerced or tested.

Details

is.symbol is generic: you can write methods to handle of specific classes of objects, see InternalMethods.

Note

The term “symbol” is from the lisp background of R, whereas “name” has been the standard S term for this.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth \& Brooks/Cole.

See Also

call, is.language. For the internal object mode, typeof.

Examples

an <- as.name("arrg")
is.name(an) # TRUE
str(an)# symbol

[Package base version 1.7.1 ]