[R] use of do.call and rep

About this list Date view Thread view Subject view Author view Attachment view

From: Laura Holt (lauraholt_983@hotmail.com)
Date: Wed 26 May 2004 - 06:19:36 EST


Message-id: <BAY12-F6FDOkU46M74M0002fc51@hotmail.com>

If I use this:

rep(1:2,c(5,5))

I'll get
1 1 1 1 1 2 2 2 2 2

Is there a way to do this more efficiently, please?
Maybe via do.call?

Thanks,
Laura
mailto: lauraholt_983@hotmail.com

_________________________________________________________________

http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:12 EST