fpp3
Overview
The fpp3 package contains data used in the book Forecasting: Principles and Practice (3rd edition) by Rob J Hyndman and George Athanasopoulos. It also loads several packages needed to do the analysis described in the book. These packages work with the tidyverse set of packages, sharing common data representations and API design.
Installation
You can install the stable version from CRAN.
install.packages('fpp3', dependencies = TRUE)
You can install the development version from Github
# install.packages("remotes")
remotes::install_github("robjhyndman/fpp3package")
Usage
library(fpp3)
will load the following packages:
- tibble, for tibbles, a modern re-imagining of data frames.
- dplyr, for data manipulation.
- tidyr, to easily tidy data using
spread()
andgather()
. - lubridate, for date/times.
- ggplot2, for data visualisation.
- tsibble, for tsibbles, a time series version of a tibble.
- tsibbledata, various time series data sets in the form of tsibbles.
- feasts, for features and statistics of time series.
- fable, for fitting models and producing forecasts.
You also get a condensed summary of conflicts with other packages you have loaded:
library(fpp3)
#> ── Attaching packages ────────────────────────────────────────────── fpp3 0.5 ──
#> ✔ tibble 3.1.8 ✔ tsibble 1.1.3
#> ✔ dplyr 1.1.0 ✔ tsibbledata 0.4.1
#> ✔ tidyr 1.3.0 ✔ feasts 0.3.0
#> ✔ lubridate 1.9.1 ✔ fable 0.3.2
#> ✔ ggplot2 3.4.0 ✔ fabletools 0.3.2
#> ── Conflicts ───────────────────────────────────────────────── fpp3_conflicts ──
#> ✖ lubridate::date() masks base::date()
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ tsibble::intersect() masks base::intersect()
#> ✖ tsibble::interval() masks lubridate::interval()
#> ✖ dplyr::lag() masks stats::lag()
#> ✖ tsibble::setdiff() masks base::setdiff()
#> ✖ tsibble::union() masks base::union()