From l.temarvelde at nioo.knaw.nl  Thu Sep  4 09:06:44 2008
From: l.temarvelde at nioo.knaw.nl (RFTW)
Date: Thu, 4 Sep 2008 00:06:44 -0700 (PDT)
Subject: [Rd]  calculating means per group
Message-ID: <19271479.post@talk.nabble.com>


Hi all
I have a very basic question, yet i have not found how to do it.

Suppose my dataset looks like this:

Year	Area	value
1	a	20
1	a	25
1	a	28
1	a	31
1	a	23
1	b	25
1	b	28
1	b	23
1	b	19
2	a	25
2	a	23
2	a	24
2	a	26
2	b	27
2	b	28
2	b	20
2	b	25
2	b	28


Now, i want to calculate a MEAN per year per area. How do i do that?

With mean(value) i calculate the mean of all values of course. I just need
to know how to group year and area correctly.

I assume that i can use this grouping in other calculations too, right?


Cheers,

Luc
-- 
View this message in context: http://www.nabble.com/calculating-means-per-group-tp19271479p19271479.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] calculating means per group
RFTW