[R] repeating values

Anders Bjørgesæter anders.bjorgesater at bio.uio.no
Fri Sep 8 15:32:01 CEST 2006


Hello

I have 2 two vectors like

x	N
2	3
4	1
5	2

and want to make a new vector

x
2
2
2
4
5
5

i.e. repeat the values in x according to N


Thanks for your help.

Best Regards
Anders



More information about the R-help mailing list