It's pretty clear from the error message that dat$Date is not an appropriate
time-based object.
Since dat$Date is created by the get_majorlandmarks() function, and your
question provides no information about that, it's hard to be more specific.
However, I would suggest looking at the output of
Need Help in Debugging below script:
dat <- get_majorlandmarks(dat,Dmin,Per)
fit_xts <- xts(dat$fit,order.by = dat$Date,frequency = 365)
close_xts <- xts(dat$Close, order.by = dat$Date, frequency = 365 )
majorlandmarks_xts <-xts(dat$Close[dat$majorlandmarks==TRUE]
2 matches
Mail list logo