Full_Name: G. Grothendieck
Version: R version 2.1.0, 2005-06-10
OS: Windows XP
Submission from: (NULL) (216.59.226.184)
This is an inconsistency between by and similar functions.
The 'by' function should have an initial line of:
FUN <- match.fun(FUN)
All other similar functions including app
Gabor Grothendieck <[EMAIL PROTECTED]> writes:
> On 6/12/05, Simon Urbanek <[EMAIL PROTECTED]> wrote:
> > Umm.. why don't you just use
> >
> > by(iris, row.names(iris), `(`)
> >
> > In general I consider passing functions as text unnecessary - the
> > only use I could think of is constructi
On 6/12/05, Simon Urbanek <[EMAIL PROTECTED]> wrote:
> On Jun 12, 2005, at 3:21 PM, Gabor Grothendieck wrote:
>
> > On 6/12/05, Liaw, Andy <[EMAIL PROTECTED]> wrote:
> >
> >> I don't get the point. ?by says:
> >>
> >
> > The point is that all other functions of this sort including apply,
> > sapp
On Jun 12, 2005, at 3:21 PM, Gabor Grothendieck wrote:
> On 6/12/05, Liaw, Andy <[EMAIL PROTECTED]> wrote:
>
>> I don't get the point. ?by says:
>>
>
> The point is that all other functions of this sort including apply,
> sapply,
> tapply, lapply work like that so 'by' ought to as well.
>
> Her
On 6/12/05, Liaw, Andy <[EMAIL PROTECTED]> wrote:
> I don't get the point. ?by says:
The point is that all other functions of this sort including apply, sapply,
tapply, lapply work like that so 'by' ought to as well.
Here is the example (changed to use iris) where I noticed it. Suppose we
wa
I don't get the point. ?by says:
FUN a function to be applied to data frame subsets of data.
It doesn't say FUN can be a character, and by(iris, iris$Species, summary)
works as expected.
Andy
> From: Gabor Grothendieck
>
> I noticed that, unlike similar functions, 'by' does not use
> match.
I noticed that, unlike similar functions, 'by' does not use match.fun, e.g.
> by(iris, iris$Species, "summary")
Error in FUN(X[[1]], ...) : couldn't find function "FUN"
The 'by' code should have an initial line of:
FUN <- match.fun(FUN)
__
R-devel@r-p