Re: [R] aggregate data.frame based on column class

2013-01-11 Thread arun
- From: Martin Batholdy To: "r-help@r-project.org" Cc: Sent: Friday, January 11, 2013 10:07 AM Subject: [R] aggregate data.frame based on column class Hi, When using the aggregate function to aggregate a data.frame by one or more grouping variables I often have the problem, that I want t

Re: [R] aggregate data.frame based on column class

2013-01-11 Thread arun
3 10:07 AM Subject: [R] aggregate data.frame based on column class Hi, When using the aggregate function to aggregate a data.frame by one or more grouping variables I often have the problem, that I want the mean for some numeric variables but the unique value for factor variables. So for example in

Re: [R] aggregate data.frame based on column class

2013-01-11 Thread Ista Zahn
Please see in line. On Fri, Jan 11, 2013 at 10:07 AM, Martin Batholdy wrote: > Hi, > > When using the aggregate function to aggregate a data.frame by one or more > grouping variables I often have the problem, that I want the mean for some > numeric variables but the unique value for factor vari

[R] aggregate data.frame based on column class

2013-01-11 Thread Martin Batholdy
Hi, When using the aggregate function to aggregate a data.frame by one or more grouping variables I often have the problem, that I want the mean for some numeric variables but the unique value for factor variables. So for example in this data-frame: data <- data.frame(x = rnorm(10,1,2), group