Creation of a chronological series with the # ts() function


hello, the image you see above is a time series from 2020-03-20 to 2020-06-02 on the COVID-19 in Senegal.
I want to make forecasts on it. I use the package * fpp2 *.
However I do not know how to choose the frequency for the creation of the time series on R.
my code with the * ts () * function:

Mettre le format idéal de la date avec 'as.POSIXct()'

covid19_SN <- covid19_SN %>%
mutate(date = as.POSIXct(date)) %>%
arrange(date)

Création de la série chronologique

ts_covid19 <- ts(covid19_SN[,2:ncol(covid19_SN)],
start = c(3,2), end = c(6,2), frequency = 30)
head(force(ts_covid19), 10)

Here is what I did is correct and if not there is a better way to do it. Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.