Section 7 R Assignment Operator


7.1 Assignment Operator


7.2 Equivalent assignment


x <- 5
x
y = 5
y


7.3 Note other symbols


  • Command line prompt: >

  • Comment symbol: #

  • Console window continuation symbol: +

  • Vector symbol: []

  • Special symbol in a script: ;


7.4 Find the difference


x <- 5
x

x <- 7
x

y <- 10
y

y -> x
y
x


m<-7
m

z <- -10
z
z < - 5
z

k < -5
k