A ‘name’ (also known as a ‘symbol’) is a way to refer to R objects by name (rather than the value of the object, if any, bound to that name). as.name and as.symbol are identical: they attempt to coerce the argument to a name. is.symbol and the identical is.name return TRUE or FALSE depending on whether the argument is a name or not.
as.symbol(x)
is.symbol(x)<p></p><p>as.name(x)
is.name(x)</p>
| Parameter | Description |
|---|---|
x |
object to be coerced or tested. |
# NOT RUN {
an <- as.name("arrg")
is.name(an) # TRUE
mode(an) # name
typeof(an) # symbol
# }