Hi,
I am create a new DF that summarizes the mean angle per treatment/trial, of
the original DF (see below). I have had some success using:
(tapply(df$Angle, INDEX=interaction(df$State,
df$Trial), FUN=mean)); however, this gives the answer as a list, which
means I would have to split the name
Tena koe Jim
?aggregate
HTH
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of jimdare
Sent: Friday, 6 November 2009 2:54 p.m.
To: r-help@r-project.org
Subject: [R] Calculate Mean for each Treatment/Trial
On Nov 5, 2009, at 7:53 PM, jimdare wrote:
I am create a new DF that summarizes the mean angle per treatment/
trial, of
the original DF (see below). I have had some success using:
(tapply(df$Angle, INDEX=interaction(df$State,
df$Trial), FUN=mean));
That's rather difficult to accept,
3 matches
Mail list logo