Re: [R] Calculating a mean based on a factor range

2011-06-10 Thread Jim Lemon
On 06/10/2011 08:10 AM, Sam Albers wrote: Hello all, I have been using an instrument that collects a temperature profile of a water column. The instrument records the temperature and depth any time it takes a reading. I was sampling many times at discrete depth rather than a complete profile of

Re: [R] Calculating a mean based on a factor range

2011-06-09 Thread Peter Alspach
Tena koe Sam You could use cut() to convert the depths into your categories and then tapply(). HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Sam Albers > Sent: Friday, 10 June 2011 10:10 a.m. > To: