Formatting the dates generated by the forecast function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Formatting the dates generated by the forecast function

PaulJr
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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Formatting the dates generated by the forecast function

Bert Gunter-2
?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 <[hidden email]> 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]]
>
> ______________________________________________
> [hidden email] 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]]

______________________________________________
[hidden email] 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.