Skip to Content
RStudio for R Statistical Computing Cookbook
book

RStudio for R Statistical Computing Cookbook

by Andrea Cirillo
April 2016
Beginner to intermediate content levelBeginner to intermediate
246 pages
5h 20m
English
Packt Publishing
Content preview from RStudio for R Statistical Computing Cookbook

Exploring time series forecasting with forecast()

The most logical next step after understanding a time series' features and trends is trying to forecast its future development.

As one would imagine, R provides optimal tools to perform this task.

In this recipe, we will leverage the extremely popular forecast package by Professor Rob J Hyndman. The package provides an always increasing number of tools for performing univariate time series forecasting.

You can find out more on the package on Prof. Hyndman's personal site at http://robjhyndman.com/software/forecast/.

Getting ready

As stated earlier, the only package needed to perform this recipe is the forecast package. We therefore need to install it and load it:

install.packages("forecast")
library(forecast) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Data Analysis Using Jupyter Notebook

Practical Data Analysis Using Jupyter Notebook

Marc Wintjen

Publisher Resources

ISBN: 9781784391034Supplemental Content