Symbols

Formally, variable names in R are called symbols. When you assign an object to a variable name, you are actually assigning the object to a symbol in the current environment. (Somewhat tautologically, an environment is defined as the set of symbols that are defined in a certain context.) For example, the statement:

> x <- 1

assigns the symbol “x” to the object “1” in the current environment. For a more complete discussion of symbols and environments, see Chapter 8.

Get R in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.