Skip to content
Prev 16556 / 63424 Next

by should use match.fun

On 6/12/05, Liaw, Andy <andy_liaw at merck.com> wrote:
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 
want to create a list of rows:

by(iris, row.names(iris), "(")

In every other similar function this would have worked but here we must do:

by(iris, row.names(iris), match.fun("("))