Skip to content

Commit

Permalink
add new readme.rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
thiyangt committed Mar 6, 2018
1 parent a1a99c2 commit e4d383b
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
@@ -1,2 +1,4 @@
^.*\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^README-.*\.png$
17 changes: 17 additions & 0 deletions M4comp2018.Rproj
@@ -0,0 +1,17 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
Binary file added README-unnamed-chunk-3-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions README.md
@@ -0,0 +1,39 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
M4comp2018
==========

The R package M4comp2018 contains the 100000 time series from the M4-competition.

Installation
------------

You can install M4comp2018 from github with:

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

Example
-------

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

``` r
## basic example code
library(M4comp2018)
data(M4)
names(M4[[1]])
#> [1] "x" "st" "type" "period" "h" "sn"
#extract yearly series
yearly_M4 <- Filter(function(l) l$period == "Yearly", M4)
```

``` r
library(ggplot2)
library(forecast)
autoplot(M4[[40773]]$x)
```

![](README-unnamed-chunk-3-1.png)
22 changes: 19 additions & 3 deletions README.rmd
@@ -1,3 +1,17 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# M4comp2018

The R package M4comp2018 contains the 100000 time series from the M4-competition.
Expand All @@ -6,12 +20,12 @@ The R package M4comp2018 contains the 100000 time series from the M4-competition

You can install M4comp2018 from github with:


``` r
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("carlanetto/M4comp2018")
```


## Example

This is a basic example which shows you how to solve a common problem:
Expand All @@ -28,5 +42,7 @@ yearly_M4 <- Filter(function(l) l$period == "Yearly", M4)
```{r}
library(ggplot2)
library(forecast)
autoplot(M4[[10000]]$x)
autoplot(M4[[40773]]$x)
```


0 comments on commit e4d383b

Please sign in to comment.