All:

I have a SQlite database where I have stored some verification data by date
& time (cycle Z/UTC), lead_time as well as type, duration, etc. I would
like to analyze & plot the data as monthly averages. I have looked at a
bunch of examples which use some combination of zoo and aggregate, but I
have not been able to successfully apply bits and pieces from the examples
I have found. Any help is appreciated. BTW, I calculate mae (mean absolute
error), mse (mean squared error), me (mean error), and other measures
obtained by using the R verification package.

The example below is limited to 20 records and shows lead_time, r_squared,
(forecast) cycle, fcst_date (forecast date) -- the full data set is just
over 2 years of daily data with 3 forecast cycles (00Z, 12Z, and 18Z) daily.

>From my query, below) how do I construct an appropriate data structure to
analyze & plot the data as monthly averages?

Regards,
Tom

> q<-dbGetQuery(con,"select lead_time,r_squared,cycle,fcst_date from
verify_table where duration=6 limit 20")
> q
   lead_time    r_squared cycle  fcst_date
1          6 5.405095e-02    00 07/31/2010
2         12 5.521620e-06    00 07/31/2010
3         18 1.565910e-04    00 07/31/2010
4         24 8.646822e-02    00 07/31/2010
5         30 1.719604e-02    00 07/31/2010
6         36 5.768113e-04    00 07/31/2010
7         42 2.501269e-06    00 07/31/2010
8         48 6.451727e-02    00 07/31/2010
9          6 2.857931e-01    12 07/31/2010
10        12 1.138635e-01    12 07/31/2010
11        18 2.225503e-02    12 07/31/2010
12        24 1.182031e-03    12 07/31/2010
13        30 8.841142e-04    12 07/31/2010
14        36 1.082490e-01    12 07/31/2010
15        42 1.502887e-05    12 07/31/2010
16        48           NA    12 07/31/2010
17         6 8.689588e-02    00 08/01/2010
18        12 5.884336e-04    00 08/01/2010
19        18 2.219316e-07    00 08/01/2010
20        24 3.960752e-02    00 08/01/2010

-- 

Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL:  thomas.ad...@noaa.gov
VOICE:  937-383-0528
FAX:    937-383-0033

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to