Skip to content
Prev 5344 / 63421 Next

replicating lists

On Wed, 11 Apr 2001, David James wrote:

            
Not sure I follow you here.  I want n copies of an arbitrary list, as a
list, so list(fred)[rep(1, n)] is desired, where fred is the list I want
replicated.  Unfortuntely this does not solve the underlying problem,
which is that I want to do
which breaks because "rep", invoked by "array", currently fails to handle
complex lists.  However I am happy to report that
does work as expected:
So that's the work-around in my particular case.

Cheers, Jonathan.

Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE
tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388
http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._