[R] Sequence generation in a table

Jan van der Laan rhelp at eoos.dds.nl
Thu Dec 9 11:57:07 CET 2010


Vincy,

I suppose the following does what you want. yy is now a list which 
allows for differing lengths of the vectors.

 > yy <- lapply(c(257, 520, 110), seq, to=0, by=-100)
 > yy[[1]]
[1] 257 157  57
 > yy[[2]]
[1] 520 420 320 220 120  20


Regards,
Jan


On 9-12-2010 11:40, Vincy Pyne wrote:
> c(257, 520, 110)



More information about the R-help mailing list