README.md

M4comp2018

The R package M4comp2018 contains the 100000 time series from the M4-competition. It also includes the true future values (the test part).

Installation

Development version with the latest features:

# install.packages("devtools")
devtools::install_github("carlanetto/M4comp2018")

Example

This is a basic example which shows you how to solve a common problem:

## basic example code
library(M4comp2018)
data(M4)
names(M4[[1]])
#> [1] "st"     "x"      "n"      "type"   "h"      "period" "xx"
#extract yearly series
yearly_M4 <- Filter(function(l) l$period == "Yearly", M4)
#plot one of the series, in red the future data
#in black, the hitorical data
library(ggplot2)
library(forecast)
plot(ts(c(M4[[40773]]$x, M4[[40773]]$xx),
        start=start(M4[[40773]]$x), frequency = frequency(M4[[40773]]$x)),
        col="red", type="l", ylab="")
lines(M4[[40773]]$x, col="black")

#read the help file for documentation
?M4comp2018

License

This package is free and open source software, licensed under GPL-3



thiyangt/M4comp2018 documentation built on May 14, 2019, 12:48 p.m.