[R] unexpected behaviour with ddply and colwise
Steve Lianoglou
mailinglist.honeypot at gmail.com
Thu Apr 8 01:07:04 CEST 2010
Last point ...
On Wed, Apr 7, 2010 at 6:39 PM, Stuart Andrews <stu.andrews at gmail.com> wrote:
>
> Ahhh, I see my error, thanks to Steve and others who mailed me off list.
>
> Perhaps reading a little too quickly, I mis-interpreted the help for ddply,
> in particular, the second argument:
>
>> ".variables: variables to split data frame by, as quoted variables,
>> a
>> formula or character vector"
>
> I assumed that I could select entire columns (i.e. the *variables* that
> comprise my data.frame) using this argument.
I'm not sure if this is what you were gunning for, but just in case:
If you wanted your `colwise` function to only run on a certain subset
of columns of the data.frame, you would pass those column names as the
2nd arg to the call to `colwise`.
Check out the examples in ?colwise if that's the case.
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list