Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
earowang committed Mar 25, 2018
1 parent 9a5673c commit 80ee036
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 64 deletions.
5 changes: 4 additions & 1 deletion Makefile
@@ -1,6 +1,9 @@
document:
Rscript -e "devtools::document()"

readme:
Rscript -e "rmarkdown::render('README.Rmd'); pkgdown::build_home()"

build:
Rscript -e "devtools::build()"

Expand All @@ -20,4 +23,4 @@ release:
Rscript -e "devtools::release()"

pkgdown:
Rscript -e "library(pkgdown); clean_site(); init_site(); build_home(); build_reference(run_dont_run = TRUE); build_news()"
Rscript -e "pkgdown::build_site(run_dont_run = TRUE)"
47 changes: 26 additions & 21 deletions README.md
@@ -1,30 +1,35 @@

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

[![Travis-CI Build Status](https://travis-ci.org/earowang/hts.svg?branch=master)](https://travis-ci.org/earowang/hts) [![codecov](https://codecov.io/gh/earowang/hts/branch/master/graph/badge.svg)](https://codecov.io/gh/earowang/hts) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/hts)](https://cran.r-project.org/package=hts) [![Downloads](http://cranlogs.r-pkg.org/badges/hts)](https://cran.r-project.org/package=hts)
# hts

The R package *hts* presents functions to create, plot and forecast hierarchical and grouped time series.
[![Travis-CI Build
Status](https://travis-ci.org/earowang/hts.svg?branch=master)](https://travis-ci.org/earowang/hts)
[![codecov](https://codecov.io/gh/earowang/hts/branch/master/graph/badge.svg)](https://codecov.io/gh/earowang/hts)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/hts)](https://cran.r-project.org/package=hts)
[![Downloads](http://cranlogs.r-pkg.org/badges/hts)](https://cran.r-project.org/package=hts)

Installation
------------
The R package *hts* presents functions to create, plot and forecast
hierarchical and grouped time series.

You can install the **stable** version on [R CRAN](https://cran.r-project.org/package=hts).
## Installation

You can install the **stable** version on [R
CRAN](https://cran.r-project.org/package=hts).

``` r
install.packages('hts', dependencies = TRUE)
```

You can also install the **development** version from [Github](https://github.com/robjhyndman/gts)
You can also install the **development** version from
[Github](https://github.com/robjhyndman/gts)

``` r
# install.packages("devtools")
devtools::install_github("earowang/hts")
```

Usage
-----
## Usage

### Example 1: hierarchical time series

Expand Down Expand Up @@ -68,7 +73,7 @@ aggts3 <- aggts(htseg1, levels = c(0, 2))
plot(htseg1, levels = 1)
```

![](man/figure/hts-eg1-1.png)
![](man/figure/hts-eg1-1.png)<!-- -->

``` r
smatrix(htseg1) # Return the dense mode
Expand Down Expand Up @@ -137,13 +142,13 @@ aggts4 <- aggts(fcasts1.comb)
plot(fcasts1.comb, levels = 2)
```

![](man/figure/hts-eg1-2.png)
![](man/figure/hts-eg1-2.png)<!-- -->

``` r
plot(fcasts1.comb, include = 5, levels = c(1, 2))
```

![](man/figure/hts-eg1-3.png)
![](man/figure/hts-eg1-3.png)<!-- -->

### Example 2: hierarchical time series

Expand Down Expand Up @@ -192,13 +197,13 @@ fcasts2.td <- forecast(
plot(fcasts2.td, include = 5)
```

![](man/figure/hts-eg2-1.png)
![](man/figure/hts-eg2-1.png)<!-- -->

``` r
plot(fcasts2.td, include = 5, levels = c(0, 2))
```

![](man/figure/hts-eg2-2.png)
![](man/figure/hts-eg2-2.png)<!-- -->

### Example 3: grouped time series

Expand All @@ -207,7 +212,7 @@ plot(fcasts2.td, include = 5, levels = c(0, 2))
plot(infantgts, levels = 1)
```

![](man/figure/gts-eg-1.png)
![](man/figure/gts-eg-1.png)<!-- -->

``` r

Expand All @@ -217,13 +222,13 @@ agg_gts2 <- aggts(fcasts3.comb, levels = 1, forecasts = FALSE)
plot(fcasts3.comb)
```

![](man/figure/gts-eg-2.png)
![](man/figure/gts-eg-2.png)<!-- -->

``` r
plot(fcasts3.comb, include = 5, levels = c(1, 2))
```

![](man/figure/gts-eg-3.png)
![](man/figure/gts-eg-3.png)<!-- -->

``` r

Expand All @@ -238,7 +243,7 @@ fcasts3.combn <- forecast(
)
```

License
-------
## License

This package is free and open source software, licensed under GPL (&gt;= 2).
This package is free and open source software, licensed under GPL (\>=
2).
85 changes: 43 additions & 42 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80ee036

Please sign in to comment.