I need to load to R packages : tseries and chron
Both have a function named is.weekend
I always have in my environment the function from the second package I
i had 2 packages who had same function name ts() The 2 pacckages who had the same were :
?ts
Help on topic 'ts' was found in the following packages:
Time-Series Objects
(in package stats in library C:/Program Files/R/R-3.6.2/library)
Format time stamps
(in package bReeze in library C:/Users/mycomputer/Documents/R/win-library/3.6)
Solution : Then to use the function ts that comes with package forecast i used : because the help showed me that forcast was calling stats
Time-Series Objects (in package stats
stats::ts
because is saw from help that forecasts use a package called stats ;)
forecast::ts
Time-Series Objects
(in package stats
was giving me error, because forecast package was using a sub package ;
so final usage looks like this :
library(bReeze)
library(forecast)
# Subset data
my_time_series <- stats::ts(c(df_sub$y), start=2018, frequency = 12)
# Plot
theme_set(theme_classic())
ggseasonplot(my_time_series) + labs(title="My graph title")