Re: [R] plyr package: passing further arguments fail

2008-10-07 Thread baptiste auguie
Thanks Hadley, for some reason I didn't see your email until now. It works fine with the development version, library(plyr) df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b, cc=0, d=0){ a + b + cc + d } mdply(data. = df, foo1, cc=1, d=2) I think using . prefixes is a safer optio

Re: [R] plyr package: passing further arguments fail

2008-10-05 Thread hadley wickham
On Sun, Oct 5, 2008 at 8:02 AM, Auguie, Baptiste <[EMAIL PROTECTED]> wrote: > Dear list and Hadley, > > The new plyr package seems to provide a clean and consistent way to apply a > function on several arguments. However, I don't understand why the following > example does not work like the stand

[R] plyr package: passing further arguments fail

2008-10-05 Thread Auguie, Baptiste
Dear list and Hadley, The new plyr package seems to provide a clean and consistent way to apply a function on several arguments. However, I don't understand why the following example does not work like the standard mapply, library(plyr) df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b,