Re: [R] how to make monthly time series out of daily

From: Jeffrey Ryan <jeff.a.ryan_at_gmail.com>
Date: Tue, 01 Jun 2010 21:35:25 -0700 (PDT)

library(xts)

to.monthly(x)

The code is all Fortran, and is very fast. It should work just fine on most all time-series-like objects/classes, including timeSeries.

Documentation in the vignette will help, as will ?to.period

A wealth of functions to manipulate/test/transform time-series data is part of xts. It is compatible with most all other time-series classes, and is mostly written in C. Operations nearly as fast as atomic types, and in some cases faster, and minimize memory usage.

to.period is used by many on tick-data without issue, and can support any time granularity (seconds, mins, hours, days, weeks, months, quarters, years, and arbitrary multiples of these)

Additional help is on the r-sig-finance list, as well as in a variety of slides found:

http://www.quantmod.com/Columbia2008/
http://www.quantmod.com/Rmetrics2008/

As well as:

http://www.quantmod.com/examples/data/

HTH
Jeff

-- 
View this message in context: http://r.789695.n4.nabble.com/how-to-make-monthly-time-series-out-of-daily-tp2196591p2239578.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Wed 02 Jun 2010 - 04:53:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jun 2010 - 05:40:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive