Re: [R] functions and multiple levels

2010-08-19 Thread chris20
Thanks for the replies, it wasn't quite what I wanted but it has given me some more code for working out averages. I have managed to construct something that nearly works level.1 level.2 observation 1 1 0.5 1 1

Re: [R] functions and multiple levels

2010-08-18 Thread Wu Gong
Hi Chris, Try ?ave will help you. Anyway, I guess you are computing a statistic. strs -level.1 level.2 observation 1 1 0.5 1 1 0.2 1 2 0.6 1 2

Re: [R] functions and multiple levels

2010-08-18 Thread Charles C. Berry
On Wed, 18 Aug 2010, chris20 wrote: Hi, I am trying to write a function; I want to subtract the mean of each class in level 2 from the mean of each class in level 1 and square the answer, eg. level.1 level.2 observation 1 1 0.5 1