Hello! I am new to time series and I am having trouble with a code snippet for Tsibble. I have tried to plot a seasonal plot using the gg_season funtion. My dataframe has two columns: the complete date and the temperature on a daily basis. However, for some reason, it returns this message when I run the code below:
! data contains implicit gaps in time. You should check your data and convert implicit gaps into explicit missing values using
tsibble::fill_gaps() if required.
rlang::last_trace() to see where the error occurred.
I have check and I don't have any gaps. As I expected, I have 365 rows with no missing values.
What am I missing or doing wrong? I wasn't able to find an answer myself.
# Loading libraries library(tidyverse) library(tsibble) library(ggplot2) library(feasts) library(tsibbledata) library(dplyr) # Altering the dataframe temp <- temp %>% mutate(Daily = ymd(Date)) %>% select(-Date) %>% as_tsibble(key = c(Temperatura), index = Daily) temp <- temp[order(temp$Daily),] temp temp %>% gg_season(Temperature)