Re: [R] lapply with functions with changing parameters

2010-06-02 Thread Bunny, lautloscrew.com
Henrique, thx, your suggestion worked perfectly fine for me. On 01.06.2010, at 23:01, Henrique Dallazuanna wrote: lapply(mydf[-6], ccf, y = mydf[6]) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] lapply with functions with changing parameters

2010-06-01 Thread Bunny, lautloscrew.com
Dear all, I am trying to avoid a for loop here and wonder if the following is possible: I have a data.frame with 6 columns and i want to get a cross-correlogram (by using ccf) . Obivously ccf only accepts two columns at once and then returms a list. In fact, with a for loop i´d do the

Re: [R] lapply with functions with changing parameters

2010-06-01 Thread Henrique Dallazuanna
Try this: lapply(mydf[-6], ccf, y = mydf[6]) On Tue, Jun 1, 2010 at 5:50 PM, Bunny, lautloscrew.com bu...@lautloscrew.com wrote: Dear all, I am trying to avoid a for loop here and wonder if the following is possible: I have a data.frame with 6 columns and i want to get a

Re: [R] lapply with functions with changing parameters

2010-06-01 Thread Erik Iverson
Bunny, lautloscrew.com wrote: Dear all, I am trying to avoid a for loop here and wonder if the following is possible: I have a data.frame with 6 columns and i want to get a cross-correlogram (by using ccf) . Obivously ccf only accepts two columns at once and then returms a list. In fact,