Hi, R users,
I'm wondering how I can aggregate data in R with different functions for
different columns. For example:
x-rep(1:5,3)
y-cbind(x,a=1:15,b=21:35)
y-data.frame(y)
I want to aggregate a and b in y by x. With a, I want to use
function mean; with b, I want to use function sum. I tried
, mean.a=mean(a), sum.b=sum(b))
Best,
Ista
On Tue, Feb 22, 2011 at 5:25 PM, Hongwei Dong pdxd...@gmail.com wrote:
Hi, R users,
I'm wondering how I can aggregate data in R with different functions for
different columns. For example:
x-rep(1:5,3)
y-cbind(x,a=1:15,b=21:35)
y-data.frame(y)
I want
Gary/Hongwei writes:
I'm wondering how I can aggregate data in R with different functions for
different columns. For example:
x-rep(1:5,3)
y-cbind(x,a=1:15,b=21:35)
y-data.frame(y)
I want to aggregate a and b in y by x. With a, I want to use
function mean; with b, I want to use function
,
I'm wondering how I can aggregate data in R with different functions for
different columns. For example:
x-rep(1:5,3)
y-cbind(x,a=1:15,b=21:35)
y-data.frame(y)
I want to aggregate a and b in y by x. With a, I want to use
function mean; with b, I want to use function sum. I tried
Controllers) .OO#. .OO#. rocks...1k
---
Sent from my phone. Please excuse my brevity.
Hongwei Dong pdxd...@gmail.com wrote:
Hi, R users, I'm wondering how I can aggregate data in R with different
functions for different
: Hongwei Dong pdxd...@gmail.com
Betreff: [R] aggregate in R
An: r-help@r-project.org
Datum: Dienstag, 22. Februar, 2011 22:25 Uhr
Hi, R users,
I'm wondering how I can aggregate data in R with different
functions for
different columns. For example:
x-rep(1:5,3)
y-cbind(x,a=1:15,b=21:35
...@gmail.com wrote:
Hi, R users, I'm wondering how I can aggregate data in R with different functions for different columns. For example: x-rep(1:5,3)
y-cbind(x,a=1:15,b=21:35) y-data.frame(y) I want to aggregate a and b in y by x. With a, I want to use
function mean; with b, I want to use function sum
7 matches
Mail list logo