0

My question relates not to the axis labels but the tick labels that appear below the x-axis.

I have forecast my hourly time series using auto.arima to obtain a 3 month prediction. I'm happy with the results of that but the resulting autoplot graph has lost the formatting of the time series field e.g. "2014-07-01 19:00:00" has become 0e +00

No matter what formatting I have tried, by the current count I'm at attempt number 7(!) I cannot get the date/time in the required format. The code I have used to plot is:

farima <- function(x, h) {
forecast(auto.arima(x), h=h)
}
forecast.xts <- myxts %>% farima(h = 2160) %>% forecast() %>% autoplot()

All help is gratefully received.

Ta muchly

EDIT

Here is a sample of the raw data:

# A tibble: 6 x 8
  Number             Created        Category Priority `Incident state` `Reassignment count` Urgency  Impact
   <dbl>              <dttm>           <chr>    <dbl>            <chr>                <dbl>   <chr>   <chr>
1      1 2014-07-01 19:00:00 Software/System        5           Closed                    0 3 - Low 3 - Low
2      2 2014-07-02 15:00:00 Software/System        5           Closed                    0 3 - Low 3 - Low
3      3 2014-07-02 15:00:00 Software/System        5           Closed                    0 3 - Low 3 - Low
4      4 2014-07-02 15:00:00 Software/System        5           Closed                    0 3 - Low 3 - Low
5      5 2014-07-02 15:00:00 Software/System        5           Closed                    0 3 - Low 3 - Low
6      6 2014-07-02 15:00:00 Software/System        5           Closed                    0 3 - Low 3 - Low   

Here is the resulting xts data frame (after help from Florian) which added in hourly fields to make the time intervals evenly spaced:

                    [,1]
2014-07-01 19:00:00    1
2014-07-01 20:00:00    0
2014-07-01 21:00:00    0
2014-07-01 22:00:00    0
2014-07-01 23:00:00    0
2014-07-02 00:00:00    0
2014-07-02 01:00:00    0
2014-07-02 02:00:00    0
2014-07-02 03:00:00    0
2014-07-02 04:00:00    0

Once the code in my original pot is run I get a lovely looking graph but not the time series data for the labels that I'm looking for.

  • It would be easier to help you with a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data so we can run to code to see what's going on. – MrFlick Jul 24 '17 at 20:22
  • I've added the data. Thanks for any help that you can offer. – UncouthScientist Jul 25 '17 at 16:16

0 Answers0