On Nov 17, 2007 8:55 AM, Emmanuel Charpentier
<[EMAIL PROTECTED]> wrote:
> Dear Lucia,
>
> lucia a écrit :
> > Hello,
> > I'm very new to R, and so my question is simple.
> >
> > I have data record with 80 years of daily temperatures in one long
> > string. The dates are also recorded, in YYMMDD f
On Nov 17, 2007 8:55 AM, Emmanuel Charpentier
<[EMAIL PROTECTED]> wrote:
> Dear Lucia,
>
> lucia a écrit :
> > Hello,
> > I'm very new to R, and so my question is simple.
> >
> > I have data record with 80 years of daily temperatures in one long
> > string. The dates are also recorded, in YYMMDD f
Dear Lucia,
lucia a écrit :
> Hello,
> I'm very new to R, and so my question is simple.
>
> I have data record with 80 years of daily temperatures in one long
> string. The dates are also recorded, in YYMMDD format. I'd like to
> learn an elegant simple way to pull out the annual averages.
Assuming we use zoo, we define a test series, z, and then aggregate it:
> library(zoo)
> z <- zooreg(1000:2000, start = as.Date("2000-01-01"))
> aggregate(z, as.numeric(format(time(z), "%Y")), mean)
2000 2001 2002
1182.5 1548.0 1865.5
See:
vignette("zoo")
vignette("zoo-quickref")
?zoo
Hello,
I'm very new to R, and so my question is simple.
I have data record with 80 years of daily temperatures in one long
string. The dates are also recorded, in YYMMDD format. I'd like to
learn an elegant simple way to pull out the annual averages.
(Obviously, every 4th year has 366 days
5 matches
Mail list logo