Skip to content

Creating Timeseries by manipulating data table

3 messages · Chuske, R. Michael Weylandt, Gabor Grothendieck

#
Hi,

I'm new to R and tried a search but couldn't find what I was looking for.

I have some data as a csv file with columns:-

longditude latitude year month rainfall region

What I need to do is produce a monthly time series for each region, where
region is an integer id and where each time point in the series is the
monthly average of rainfall for each location in that region.

Basically I know how to read the data as:-

raindata<-read.csv("Rainfall.csv")

but have no idea how to create the timeseries using R.

Any help would be appreciated.

Thanks

Chuske

--
View this message in context: http://r.789695.n4.nabble.com/Creating-Timeseries-by-manipulating-data-table-tp4042875p4042875.html
Sent from the R help mailing list archive at Nabble.com.
#
It's a big subject and various mechanisms exist, but you should
probably start by looking into the zoo package and the read.zoo()
function.

Hope that helps,

Michael
On Tue, Nov 15, 2011 at 8:03 AM, Chuske <jrm212 at ex.ac.uk> wrote:
#
On Tue, Nov 15, 2011 at 8:20 AM, R. Michael Weylandt
<michael.weylandt at gmail.com> wrote:
Note that there is an entire vignette on read.zoo, as well.  See the
Reading Data in Zoo link here:
http://cran.r-project.org/web/packages/zoo/index.html
or from within R:
vignette("zoo-read")
If you haven't used zoo before you should read all 5 vignettes and the
help files.