-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
68 lines (54 loc) · 3.1 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
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-",
fig.align = "center"
)
library(rjwsacruncher)
```
# rjwsacruncher
[![R-CMD-check](https://github.com/AQLT/rjwsacruncher/workflows/R-CMD-check/badge.svg)](https://github.com/AQLT/rjwsacruncher/actions)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rjwsacruncher)](https://cran.r-project.org/package=rjwsacruncher)
[![CRAN last release](https://www.r-pkg.org/badges/last-release/rjwsacruncher)](https://cran.r-project.org/package=rjwsacruncher)
[![CRAN monthly downloads](https://cranlogs.r-pkg.org/badges/rjwsacruncher?color=lightgrey)](https://cran.r-project.org/package=rjwsacruncher)
[![CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/rjwsacruncher?color=lightgrey)](https://cran.r-project.org/package=rjwsacruncher)
The goal of rjwsacruncher is to launch quickly and easily the [JWSACruncher](https://github.com/jdemetra/jwsacruncher) of [JDemetra+](https://github.com/jdemetra/jdemetra-app). The JWSACruncher is a console tool that allows to update a JDemetra+ workspace and to export the results without having to open JDemetra+. More details on the JWSACruncher can be found on <https://github.com/jdemetra/jwsacruncher/wiki>.
## Installation
```{r gh-installation, eval = FALSE}
# Install release version from CRAN
install.packages("rjwsacruncher")
# Install development version from GitHub
# install.packages("devtools")
devtools::install_github("AQLT/rjwsacruncher")
```
The JWSACruncher is not included in the package. It can be downloaded from GitHub (<https://github.com/jdemetra/jwsacruncher/releases>) or with the function `download_cruncher()`:
```{r, eval = FALSE}
library(rjwsacruncher)
# Directory where to save the JWSACruncher:
directory <- tempdir()
download_cruncher(directory)
```
Since the version 2.2.0, the JWSACruncher needs Java 8 or higher to run. If you cannot install it (for example for security reasons) you can install a portable version of 'Java' (that does not require administrator rights) and configure the JWSACruncher to use this portable version with the function `configure_jwsacruncher()`.
## Usage
The JWSACruncher can be easily runned with the function `cruncher_and_param()`. To use it, the path to the "Bin" folder of the JWSACruncher has to be defined. For example, if the JWSACruncher is under `D:/jdemetra-cli-2.2.3/`:
```{r, eval = FALSE}
options(cruncher_bin_directory = "D:/jdemetra-cli-2.2.3/bin/")
```
The export items can be changed with the function "default_matrix_item" and "default_tsmatrix_series":
```{r, eval = TRUE}
# To get the default values:
head(getOption("default_matrix_item"))
getOption("default_tsmatrix_series")
# To only export the seasonally adjusted series and its forecasts:
options(default_tsmatrix_series = c("sa", "sa_f"))
```
The run the JWSACruncher on the workspace `D:/workspace.xml` with the refresh policy "lastoutliers":
```{r, eval = FALSE}
cruncher_and_param(workspace = "D:/workspace.xml",
policy = "lastoutliers")
```