HiNot sure why i get error like this:?Error in xts(forecasts, dates[(window.length):length(returns)]) :?? order.by requires an appropriate time-based object I have researched for the answer that i need to convert returns into time series. I did that but still it doesn't work?See attached for file.Thanks -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 111.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170226/408992f3/attachment.txt>
order.by requires an appropriate time-based object
2 messages · Allan Tanaka, Joshua Ulrich
Please provide a minimal, reproducible example. It's really hard for someone to help you if you give them nearly 100 lines of code and no data. My guess is that data[,1] is character (or factor) and you need to convert it to Date or POSIXct.
On Sun, Feb 26, 2017 at 9:24 AM, Allan Tanaka <allantanaka11 at yahoo.com> wrote:
HiNot sure why i get error like this: Error in xts(forecasts, dates[(window.length):length(returns)]) : order.by requires an appropriate time-based object I have researched for the answer that i need to convert returns into time series. I did that but still it doesn't work?See attached for file.Thanks
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com R/Finance 2017 | www.rinfinance.com