向量之间的加减乘除运算:
> x <- 1 > x [1] 1 2 3 4 5 6 7 8 9 10 > x=x+1 > x [1] 2 3 4 5 6 7 8 9 10 11 > x = 1:10 > x [1] 1 2 3 4 5 6 7 8 9 10 > y = seq(1,100, length.out = 10) > y [1] 1 12 23 34 45 56 67 78 89 100 > x*y [1] 1 24 69 136 225 336 469 624 801 1000 > x**y [1] 1.000000e+00 4.096000e+03 9.414318e+10 2.951479e+20 [5] 2.842171e+31 3.771117e+43 4.183778e+56 2.760699e+70 [9] 8.464150e+84 1.000000e+100