Dear colleagues, How can I create time series (ts) object with specified dates? E.g. data = c(100,101,99) dates = c(?2013-05-20?,?2013-05-21?,?2013-05-30?) and plot it with specified time range? In case I have several ts and want to plot them on one chart E.g. ts1, ts2, ts3 date >= ?2013-05-20? & date <= ?2013-05-25? Thank you! Sincerely, Oleg Mubarakshin om at quant-lab.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130530/c8fe5864/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 4432 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130530/c8fe5864/attachment.jpe>
ts object
4 messages · Oleg Mubarakshin, Deo Jaiswal, R. Michael Weylandt +1 more
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130530/f9e6c8be/attachment.pl>
To echo what Deo is saying, if the question is 'how to do X with ts objects' the answer is almost always going to be 'Use xts instead'. It's not quite a drop in for one or two things, but its basically always going to be better for whatever you may wish. M
On May 30, 2013, at 15:34, Deo Jaiswal <deo.jaiswal at gmail.com> wrote:
require(xts)
data <- c(100,101,99)
dates <-
c(as.POSIXlt('2013-05-20'),as.POSIXlt('2013-05-21'),as.POSIXlt('2013-05-30'))
xts(c,order.by=dates)
Deo Jaiswal
Student of R
On Thu, May 30, 2013 at 9:17 AM, Oleg Mubarakshin <
oleg.mubarakshin at gmail.com> wrote:
Dear colleagues, How can I create time series (ts) object with specified dates? E.g. data = c(100,101,99) dates = c(?2013-05-20?,?2013-05-21?,?2013-05-30?) and plot it with specified time range? In case I have several ts and want to plot them on one chart E.g. ts1, ts2, ts3 date >= ?2013-05-20? & date <= ?2013-05-25? Thank you! Sincerely, Oleg Mubarakshin om at quant-lab.com [image: logo_ql_email] <http://quant-lab.com/>
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130530/7048f396/attachment.pl>