x<-1:10
y<-10:1
x+y [1] 11 11 11 11 11 11 11 11 11 11x<-1:10
y<-10:1
x+y [1] 11 11 11 11 11 11 11 11 11 11x<-rep(100,time=10)
x + 1 [1] 101 101 101 101 101 101 101 101 101 101x + 1:2 [1] 101 102 101 102 101 102 101 102 101 102x + 1:3Warning 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 101x + 1:4Warning 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 102x + 1:5 [1] 101 102 103 104 105 101 102 103 104 105data<-data.frame(x=1:6)
datadata$y=c('A','B','C')
data# data$z=1:5 报错,因为6不能被5整除