[R] manipulating arrays

Gabor Grothendieck ggrothendieck at gmail.com
Sat Jul 28 02:49:15 CEST 2007


Try this:

> x <- 11:15
> append(x, values = 99, after = 1)
[1] 11 99 12 13 14 15


On 7/27/07, Nair, Murlidharan T <mnair at iusb.edu> wrote:
> Can I insert an element in an array at a particular position without
> destroying the already existing element?
>
>
>
> X<-c(1,2,3,4,5)
>
>
>
> I want to insert an element between 1 and 2.
>
>
>
> Thanks ../Murli
>
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list