The goal of rjwsacruncher is to launch quickly and easily the JWSACruncher of JDemetra+. 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.
# 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()
:
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()
.
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/
:
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”:
# To get the default values:
head(getOption("default_matrix_item"))
#> [1] "period" "span.start" "span.end" "span.n" "span.missing"
#> [6] "espan.start"
getOption("default_tsmatrix_series")
#> [1] "y" "t" "sa" "s" "i" "ycal"
# 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”:
cruncher_and_param(workspace = "D:/workspace.xml",
policy = "lastoutliers")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.