- c
R vectors
- c stands for concatenate
examples/vectors/vector.R
x = c(2, 5, 1, 19) print(x) y = x + 2 print(y) z = x * 2 print(z) lg = log(x) print(lg)
[1] 2 5 1 19 [1] 4 7 3 21 [1] 4 10 2 38 [1] 0.6931472 1.6094379 0.0000000 2.9444390
x = c(2, 5, 1, 19) print(x) y = x + 2 print(y) z = x * 2 print(z) lg = log(x) print(lg)
[1] 2 5 1 19 [1] 4 7 3 21 [1] 4 10 2 38 [1] 0.6931472 1.6094379 0.0000000 2.9444390