-
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
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
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
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
4 matches
Mail list logo