<-1:10
x<-10:1
y+y x
[1] 11 11 11 11 11 11 11 11 11 11
<-1:10
x<-10:1
y+y x
[1] 11 11 11 11 11 11 11 11 11 11
<-rep(100,time=10)
x+ 1 x
[1] 101 101 101 101 101 101 101 101 101 101
+ 1:2 x
[1] 101 102 101 102 101 102 101 102 101 102
+ 1:3 x
Warning in x + 1:3: longer object length is not a multiple of shorter object
length
[1] 101 102 103 101 102 103 101 102 103 101
+ 1:4 x
Warning in x + 1:4: longer object length is not a multiple of shorter object
length
[1] 101 102 103 104 101 102 103 104 101 102
+ 1:5 x
[1] 101 102 103 104 105 101 102 103 104 105
<-data.frame(x=1:6)
data data
$y=c('A','B','C')
data data
# data$z=1:5 报错,因为6不能被5整除