Paul Bernal
2017-Oct-06 18:30 UTC
[R] Formatting the dates generated by the forecast function
Dear friend, hope you are doing great, I have the following code:> myTseriesData <- ts(data[,2], start=c(2000,01), end=c(2017,9),frequency=12)> myTseriesModel <- auto.arima(myTseriesData, d=1, D=1) > myTseriesForecast <- forecast(myTseriesModel, h=12) > # I want to be able to format the dates generated by the forecast functionis there a way to change the format of the dates generated by the forecast function into a YYYY-mm-dd format? Any hint or guidance will be greatly appreciated, Best of regards, Paul [[alternative HTML version deleted]]
Bert Gunter
2017-Oct-06 21:54 UTC
[R] Formatting the dates generated by the forecast function
?format.Date -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Oct 6, 2017 at 11:30 AM, Paul Bernal <paulbernal07 at gmail.com> wrote:> Dear friend, hope you are doing great, > > I have the following code: > > > myTseriesData <- ts(data[,2], start=c(2000,01), end=c(2017,9), > frequency=12) > > myTseriesModel <- auto.arima(myTseriesData, d=1, D=1) > > myTseriesForecast <- forecast(myTseriesModel, h=12) > > # I want to be able to format the dates generated by the forecast > function > > > is there a way to change the format of the dates generated by the forecast > function into a YYYY-mm-dd format? > > Any hint or guidance will be greatly appreciated, > > Best of regards, > > Paul > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >[[alternative HTML version deleted]]
Maybe Matching Threads
- Using the R predict function to forecast a model fit with auto.arima function
- Odd dates generated in Forecasts
- Issues when trying to fit a nonlinear regression model
- Issues when trying to fit a nonlinear regression model
- [R] Problems when trying to install and load package "rzmq"