[R] do.call() and aperm()

Gabor Grothendieck ggrothendieck at myway.com
Tue Oct 21 19:30:07 CEST 2003


Please ignore this email.  I just reread the abind
documentation and it already does this!




 --- On Tue 10/21, Gabor Grothendieck < ggrothendieck at myway.com > wrote:
From: Gabor Grothendieck [mailto: ggrothendieck at myway.com]
To: tplate at blackmesacapital.com, rksh at soc.soton.ac.uk, r-help at stat.math.ethz.ch
Date: Tue, 21 Oct 2003 13:22:28 -0400 (EDT)
Subject: Re: [R] do.call() and aperm()

<br><br>I suggest following APL as that is a well thought out system.<br>In APL terms there are two operations here called:<br><br>- catenation. In abind, this occurs when along = 1,2,...,length(dim)<br>- lamination.  In abind, this occurs when along = length(dim) + 1<br><br>however, the latter is really only one case of lamination in <br>which the added dimension comes at the end.  To do it in full<br>generality would require that one can add the new dimension<br>at any spot including before the first, between the first and<br>the second, ..., after the last.<br><br>In APL notation, if along has a fractional part then the new<br>dimension is placed between floor(along) and ceiling(along).<br>Thus along=1.1 would put the new dimension between the first<br>and second.  The actual value of the fractional part is not material.<br><br>---<br>From: Tony Plate <tplate at blackmesacapital.com><br> <br>I've also been thinking about how to specify that 'along' should be <br>length(dim)+1. At the moment one can specify any number from 0 up to <br>length(dim)+1, but as you point out you have to spell out length(dim)+1 as <br>the value for the along argument. It would possible to make abind() <br>automatically calculate along=length(dim)+1 when given along=NA, or <br>along=-1, or along="+1". Any preferences?<br><br>-- Tony Plate<br><br><br><br>_______________________________________________<br>No banners. No pop-ups. No kidding.<br>Introducing My Way - http://www.myway.com<br><br>______________________________________________<br>R-help at stat.math.ethz.ch mailing list<br>https://www.stat.math.ethz.ch/mailman/listinfo/r-help<br>

_______________________________________________
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com




More information about the R-help mailing list