library(tidyverse)
library(forecast)
weights = tibble(date = c('2019-01-01','2019-01-02','2019-01-03'),
weight = c(100,100.5,100.3))
x = ts(data = weights$weight, start = c(2019,1,1), frequency = 365.25)
fit = tbats(x)
autoplot(fc) + autolayer(fitted(fc))
Note how the X-Axis is decimal, the values can be seen this way:
time(fc$mean)
Time Series:
Start = 2019.00821355236
End = 2019.02464065708
Frequency = 365.25
[1] 2019.008 2019.011 2019.014 2019.016 2019.019 2019.022 2019.025
Adding scale_x_date doesn’t seem to work, and I can’t see a decimal handler in lubridate, nor how to pass that to scale_x_date
Created on 2019-01-28 by the reprex package (v0.2.1)