In episode 2 "Introduction to R" there are many places with phrases like this:
Assign values to objects in R
There seem to be an misconception here! In R everything is an object (see the famous quote from the book "Extending R"
by John M. Chambers: "Everything that exists in R is an object"). This means in an assignment like
x <- 1
x is an object (a variable), 1 is an object (a value), <- is (the name of) an object (a function). And the whole expression is also an object. So the formulation "Assign values to objects in R" is very misleading. It should be "Assign values to variables in R". Or, as phrased in the help to <- "Assign a value to a name."
In episode 2 "Introduction to R" there are many places with phrases like this:
There seem to be an misconception here! In R everything is an object (see the famous quote from the book "Extending R" by John M. Chambers: "Everything that exists in R is an object"). This means in an assignment like
x
is an object (a variable),1
is an object (a value),<-
is (the name of) an object (a function). And the whole expression is also an object. So the formulation "Assign values to objects in R" is very misleading. It should be "Assign values to variables in R". Or, as phrased in the help to<-
"Assign a value to a name."