Re: [R] plyr: a*ply with functions that return matrices-- possible bug in aaply?

2010-10-06 Thread Michael Friendly
On 10/4/2010 9:22 AM, hadley wickham wrote: That is, I want to define something like the following using an a*ply method, but aaply gives a result in which the applied .margin(s) do not appear last in the result, contrary to the documentation for ?aaply. I think this is a bug, either in the

Re: [R] plyr: a*ply with functions that return matrices-- possible bug in aaply?

2010-10-04 Thread hadley wickham
 That is, I want to define something like the following using an a*ply method, but aaply gives a result in which the applied .margin(s) do not appear last in the result, contrary to the documentation for ?aaply.  I think this is a bug, either in the function or the documentation, but perhaps

[R] plyr: a*ply with functions that return matrices-- possible bug in aaply?

2010-10-03 Thread Michael Friendly
I have an application where I have a function to calculate results for a 2-way table or matrix, which returns a matrix with one less row and column. To keep this short, the function below captures the structure: fun2way - function(f){ if (!length(dim(f)) ==2) stop(only for 2-way arrays)