Re: [R] by inconsistently strips class - with fix

2008-04-17 Thread Gabor Grothendieck
There is a Defaults package on CRAN that allows one to set default arguments for any function. On Thu, Apr 17, 2008 at 6:49 AM, Alex Brown <[EMAIL PROTECTED]> wrote: > Adding a simplify argument to by would suit me fine. > > In my (limited) experience in using R, the automatic simplification > tha

Re: [R] by inconsistently strips class - with fix

2008-04-17 Thread Prof Brian Ripley
On Thu, 17 Apr 2008, Alex Brown wrote: > Adding a simplify argument to by would suit me fine. > > In my (limited) experience in using R, the automatic simplification that R > does in various situations is one of it's most troublesome features. It > means that I cannot expect a program to work e

Re: [R] by inconsistently strips class - with fix

2008-04-17 Thread Alex Brown
Adding a simplify argument to by would suit me fine. In my (limited) experience in using R, the automatic simplification that R does in various situations is one of it's most troublesome features. It means that I cannot expect a program to work even if I give it data of the same types as I

Re: [R] by inconsistently strips class - with fix

2008-04-16 Thread Prof Brian Ripley
Unfortunately your proposed change changes the type of the output: simplification is intended in many applications of by(). Before: > str(by(mytimes$date[1], mytimes$set[1], function(x)x)) by [, 1] 1.21e+09 - attr(*, "dimnames")=List of 1 ..$ mytimes$set[1]: chr "1" - attr(*, "call")= l