I am using below two codes for plotting the autocorreleation of a time series,
The data looks like below:
head(hr_mymts)
Time Series:
Start = c(1, 1)
End = c(1, 6)
Frequency = 168
TempCurr
[1,] 173.2593
[2,] 176.8880
[3,] 175.6530
[4,] 174.2694
[5,] 174.1474
[6,] 173.3630
attr(,"index")
[1] 1597042800 1597046400 1597050000 1597053600 1597057200 1597060800
attr(,"index")attr(,"tzone")
[1]
attr(,"index")attr(,"tclass")
[1] POSIXct POSIXt
ggAcf(
hr_mymts,
lag.max = 940,
type = c("correlation"), plot = TRUE,
)
and ,
plot(acf(hr_mymts,lag.max = 940,plot = FALSE),main=NA)
Both results should be the same, but I can see the x-axis of the lag is different. Is there any way to get similar results? I want ggplot of ACF should have lags 1,2,3,.... on x-axis. I didn't understand the difference between the two ACF plots.