xx <- c(1, 7, 4, 31, 29)
xx
[1] 1 7 4 31 29
xx[4]
[1] 31
xx[3] <- 7 assigns a 7 to the third element of vector xx. Does not print anything. xx prints the new vector [1] 1 7 7 31 29
assigns a 7 to the third element of vector xx. Does not print anything. xx prints the new vector [1] 1 7 7 31 29
[1] 1 7 7 31 29