Re: [Rd] aperm() should retain class of input object

2010-12-29 Thread Michael Friendly
On 12/28/2010 9:43 AM, Tim Hesterberg wrote: Having aperm() return an object of the same class is dangerous, there are undoubtedly classes for which that is not appropriate, producing an illegal object for that class or quietly giving incorrect results. OK. I can see that my initial proposal

Re: [Rd] aperm() should retain class of input object

2010-12-29 Thread Martin Maechler
Michael Friendly frien...@yorku.ca on Wed, 29 Dec 2010 08:33:07 -0500 writes: On 12/28/2010 9:43 AM, Tim Hesterberg wrote: Having aperm() return an object of the same class is dangerous, there are undoubtedly classes for which that is not appropriate, producing an

Re: [Rd] aperm() should retain class of input object

2010-12-28 Thread Tim Hesterberg
Having aperm() return an object of the same class is dangerous, there are undoubtedly classes for which that is not appropriate, producing an illegal object for that class or quietly giving incorrect results. Three alternatives are to: * add the keep.class option but with default FALSE * make

[Rd] aperm() should retain class of input object

2010-12-27 Thread Michael Friendly
aperm() was designed for multidimensional arrays, but is also useful for table objects, particularly with the lattice, vcd and vcdExtra packages. But aperm() was designed and implemented before other related object classes were conceived, and I propose a small tune-up to make it more generally