Skip to content
Back to formatted view

Raw Message

Message-ID: <f8e6ff050904062013y4d6f17fahcdf2d9cc1ef3a286@mail.gmail.com>
Date: 2009-04-07T03:13:48Z
From: Hadley Wickham
Subject: SUM,COUNT,AVG
In-Reply-To: <b6bb1b550904061531r79e0539fkdcae815600ba66b6@mail.gmail.com>

On Mon, Apr 6, 2009 at 5:31 PM, Jun Shen <jun.shen.ut at gmail.com> wrote:
> This is a good example to compare different approaches. My understanding is
>
> aggregate() can apply one function to multiple columns
> summarize() can apply multiple functions to one column
> I am not sure if ddply() can actually apply multiple functions to multiple
> columns? This is what I would like to do. The syntax in the help is ?a
> little confusing to me. Appreciate more comments. Thanks

In theory, you should be able to combine colwise and each:
colwise(each(min, median, max)).   That should return the min, median
and max for each column, but currently it doesn't return the values in
quite right the form for recombination with ddply.

Hadley

-- 
http://had.co.nz/