[R] Componentwise means of a list of matrices?
macrakis at alum.mit.edu
Tue Dec 30 19:18:29 CET 2008
On Tue, Dec 30, 2008 at 12:53 PM, hadley wickham <h.wickham at gmail.com> wrote:
> On Tue, Dec 30, 2008 at 10:21 AM, baptiste auguie <ba208 at exeter.ac.uk> wrote:
>> I thought this was a good candidate for the plyr package, but it seems that
>> l*ply functions are meant to operate only on separate list elements:...
>> Perhaps a new case to consider?
> Possibly, but here I would argue that the choice of data structure
> isn't quite right - if the matrices all have the same dimension, then
> they should be stored in an array, not a list
That may be a reasonable representation, but I don't see why you'd
want to require it. In general, I'm not sure I understand the logical
intuition behind the distinction between generic vectors (lists) and
atomic vectors in many places in R (though of course I do understand
that generic vectors have more *implementation* overhead for type
tagging and garbage collection).
More information about the R-help