[R] manipulating arrays
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Sat Jul 28 15:25:41 CEST 2007
Henrique Dallazuanna wrote:
> Hi, I don't know if is the more elegant way, but:
>
> X<-c(1,2,3,4,5)
> X <- c(X[1], 0, X[2:5])
>
append(X, 0, 1)
More information about the R-help
mailing list