In one saved workspace I have the results of a simulation experiment stored as an array "resarray".> dim(resarray)[1] 10 6 500 3 In another workspace I have a similar array from another run of the simulation. I want to combine the two arrays into a single array of dimensions 10, 6, 1000, 3 What's the best way to do this? Murray Jorgensen Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz Fax +64-7 838 4155 Phone +64-7 838 4773 wk +64 7 849 6486 home Mobile 021 395 862 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Murray Jorgensen <maj at waikato.ac.nz> wants to combine two arrays, each of dim:> > dim(resarray) > [1] 10 6 500 3into one array of dim c(10, 6, 1000, 3). A function called "abind" on StatLib <http://lib.stat.cmu.edu/S/abind> does exactly this, at least in S-Plus. I have not tried it in R. -- -- David Brahm (brahm at alum.mit.edu) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
My function abind() on StatLib does not work out of the box on R because the return value from match.call() has a different structure in R. I translated it for R and have been meaning to get around to making it available. In the meantime, I'd be happy to email a copy to anyone who wants it. -- Tony Plate At 10:13 AM 10/29/2002 -0500, David Brahm wrote:>Murray Jorgensen <maj at waikato.ac.nz> wants to combine two arrays, each of dim: > > > dim(resarray) > > [1] 10 6 500 3 >into one array of dim c(10, 6, 1000, 3). > >A function called "abind" on StatLib <http://lib.stat.cmu.edu/S/abind> does >exactly this, at least in S-Plus. I have not tried it in R. >-- > -- David Brahm (brahm at alum.mit.edu) >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- >r-help 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-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._