[R] how to delete a matrix column

李红旺 hongwangli at sjtu.edu.cn
Sun Jun 17 19:24:21 CEST 2012


> a<-c(1,4)
> a
[1] 1 4
> b<-a*5
> b
[1] 5 20

a is a very long vector , how can i get c(1:5,4:20)? i do not want to
use a loop.

thanks very much!



More information about the R-help mailing list