Re: [R] order.by requires an appropriate time-based object

2017-02-27 Thread Allan Tanaka
Jesus!! even a small mistake like that can make me a headache.Thanks, this works like charm :) :) On Tuesday, 28 February 2017, 4:12, Joshua Ulrich wrote: On Sun, Feb 26, 2017 at 11:37 PM, Allan Tanaka wrote: > Here is the screenshoot to show what's happening entirely > > > > On Monda

Re: [R] order.by requires an appropriate time-based object

2017-02-27 Thread Joshua Ulrich
On Sun, Feb 26, 2017 at 11:37 PM, Allan Tanaka wrote: > Here is the screenshoot to show what's happening entirely > > > > On Monday, 27 February 2017, 12:23, Allan Tanaka > wrote: > > > See attached for updated R script > > > On Monday, 27 February 2017, 12:22, Allan Tanaka > wrote: > > > I have

Re: [R] order.by requires an appropriate time-based object

2017-02-26 Thread 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 wrote:

[R] order.by requires an appropriate time-based object

2017-02-26 Thread Allan Tanaka
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 fil