diff --git a/Sheets/Sheet_1_simplified_Tools_installation_EN_v2_only.html b/Sheets/Sheet_1_simplified_Tools_installation_EN_v2_only.html new file mode 100644 index 0000000..fa7bf68 --- /dev/null +++ b/Sheets/Sheet_1_simplified_Tools_installation_EN_v2_only.html @@ -0,0 +1,545 @@ + + + + + + + + + + + + + +Sheet_1_simplified_Tools_installation_EN_v2_only + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+

Installation JDemetra+ and Cruncher

+

Tanguy BARTHELEMY

+
+
+

Context

+

For seasonal adjustment we recommend using JDemetra+ algorithms

+

Thus, it is helpful to install the following tools:

+ +

⚠️ No assistance in SAS language will be given. +⚠️

+
+
+

Preliminary

+

On the computers without administrator rights (professional +computer, for example), it is recommended to create a folder +Software under \({\textsf{\color{#006817}{C:\\\\Users\\\\...\\\\Software}}}\) +or directly under \({\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}\) +where all software will be installed.

+

⚠️ Warning: when we specify an absolute path for a +software (JDemetra+, Java, …) in a program, a shortcut, a variable, …, +it must be modified each time any root repository is moved.

+
+
+

Installation of JDemetra+

+

JDemetra+ is a collection of Java programs used for time series +analysis and more specifically for seasonal adjustment. JDemetra+ is +delivered in the form of an GUI (Graphical User Interface) but there is +also a cruncher (executable).

+
+

Version of JDemetra+ and dependencies

+

JDemetra+ is downloadable from the github link +of the application: https://github.com/jdemetra/jdemetra-app/releases.

+

The last release (v2.2.4) +dates from January 31, 2023. It is the last stable +version of JDemetra+. This version should be downloaded and must +be used in production.

+

There is one more version of JDemetra+ which are only at a +test stage:

+
    +
  • v3.2.1: +the new JDemetra+ version with new features and a new GUI
  • +
+

JDemetra+ v2.2.4 require Java version \(\geq 8\) while v3.2.1 requires Java version +\(\geq 17\):

+ + + + + + + + + + + + + + + + + +
JDemetra+ versionJava version
v2.2.4\(\geq 8\)
v3.2.1\(\geq 17\)
+

In the following procedure, the installation processes of this 2 +versions are the same. You just have to repeat them for each version you +want to install.

+
+
+

Installation process

+

There are two possibilities for installing:

+
    +
  • Download and execute the .exe file +which requires administrator rights
  • +
  • Download and unzip the compressed +folder .zip that allows to get a portable version of the +software
  • +
+

⚠️ Warning: for the second option, you need to +download the compressed folder +jdemetra+-2.2.4-bin.zip (for the version 2.2.4 for example) +and not the folder Source code (zip).

+

The Software is in the folder \({\textsf{\color{#006817}{\\\\nbdemetra\\\\bin\\\\}}}\), +these are the file nbdemetra.exe (version 32-bit) and +nbdemetra64.exe (version 64-bit).

+

ℹ Advice: If you want to use several versions of JDemetra+ (v2.2.4, +v3.2.1, …), you can rename the unzipped folder in \({\textsf{\color{#006817}{\\\\nbdemetra-2.2.4\\\\}}}\) +and \({\textsf{\color{#006817}{\\\\nbdemetra-3.2.1\\\\}}}\).

+

ℹ️ Remark: You can create shortcuts to the executable files if you +want to launch them from another folder (Desktop, project folder…).

+
+
+

Installation of the cruncher

+

The cruncher (JWSACruncher) +is a tool to update a workspace of JDemetra+ from the console, without +opening JDemetra+ Graphical User Interface. The update of a workspace +can then be done from another Software (R or +SAS for example).

+

To use the cruncher, you have to:

+ +

If you want to install and use a portable Java version (See section +Java installation), you have to modify some +parameters to use the cruncher:

+
    +
  • In the unzipped folder, open (for example with +Notepad++) the file jwsacruncher.bat present in the +subfolder \({\textsf{\color{#006817}{\\\\bin\\\\}}}\) +(that is under \({\textsf{\color{#006817}{jdemetra-cli-2.2.4\\\\bin\\\\}}}\) +in the version 2.2.3 of the cruncher)
  • +
  • Modify the value of the variable +JAVACMD at the line 71 (currently +JAVACMD=java) by the address towards the file +java.exe of the portable version. Then, if JPortable is +installed under \({\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}\), +the new line is +if "%JAVACMD%"=="" set JAVACMD="C:\\Users\\Software\\Java64\\bin\\java" +(for Java 8).
  • +
+
+
+
+

Installation of Java

+

ℹ️ On Insee computers, Java is already installed in version 8. Then, +there is no need to install a portable version to use JDemetra+ in +version 2.2.4.

+
+

Java 8

+

To install Java 8, use the link https://portableapps.com/apps/utilities/java_portable. +If you use the version 64-bit of JDemetra+, you should install the +version jPortable 64-bit (at the bottom of the page).

+
+
+

Java 17

+

ℹ️ Remark

+

The version 3.2.1 of JDemetra+ contains a JDemetra+ version 3.2.1 +contains a jdk 17 (java 17 version) packaged in .zip. +So to use the interface, it is not necessary to install Java 17.

+
+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/Sheets/Sheet_1_simplified_Tools_installation_EN_v2_only.md b/Sheets/Sheet_1_simplified_Tools_installation_EN_v2_only.md new file mode 100644 index 0000000..5dd9a14 --- /dev/null +++ b/Sheets/Sheet_1_simplified_Tools_installation_EN_v2_only.md @@ -0,0 +1,139 @@ +Installation JDemetra+ and Cruncher +================ +Tanguy BARTHELEMY + +# Context + +For seasonal adjustment we recommend using JDemetra+ algorithms + +Thus, it is helpful to install the following tools: + +- JDemetra+ Graphical User Interface (X13-Arima and Tramo-Seats ) + +⚠️ No assistance in **SAS** language will be given. ⚠️ + +# Preliminary + +On the computers without administrator rights (*professional computer, +for example*), it is recommended to create a folder **Software** under +${\textsf{\color{#006817}{C:\\\\Users\\\\...\\\\Software}}}$ or directly +under ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$ where all +software will be installed. + +⚠️ Warning: when we specify an **absolute** path for a software +(JDemetra+, Java, …) in a program, a shortcut, a variable, …, it must be +modified each time any root repository is moved. + +# Installation of [JDemetra+](https://github.com/jdemetra/jdemetra-app) + +JDemetra+ is a collection of Java programs used for time series analysis +and more specifically for seasonal adjustment. JDemetra+ is delivered in +the form of an GUI (Graphical User Interface) but there is also a +cruncher (executable). + +## Version of JDemetra+ and dependencies + +JDemetra+ is downloadable from the [github +link](https://github.com/jdemetra/jdemetra-app/releases) of the +application: . + +The last release +([v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.3)) +dates from January 31, 2023. It is the last **stable** version of +JDemetra+. **This version should be downloaded and must be used in +production.** + +There is one more version of JDemetra+ which are only at a **test** +stage: + +- [v3.2.1](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.1): + the new JDemetra+ version with new features and a new GUI + +JDemetra+ v2.2.4 require Java version $\geq 8$ while v3.2.1 requires +Java version $\geq 17$: + +| JDemetra+ version | Java version | +|-------------------|--------------| +| v2.2.4 | $\geq 8$ | +| v3.2.1 | $\geq 17$ | + +In the following procedure, the installation processes of this 2 +versions are the same. You just have to repeat them for each version you +want to install. + +## Installation process + +There are two possibilities for installing: + +- **Download and execute** the `.exe` file which requires administrator + rights +- **Download** and **unzip** the compressed folder `.zip` that allows to + get a portable version of the software + +⚠️ Warning: for the second option, you need to **download** the +compressed folder `jdemetra+-2.2.4-bin.zip` (for the version 2.2.4 for +example) and **not** the folder `Source code (zip)`. + +The Software is in the folder +${\textsf{\color{#006817}{\\\\nbdemetra\\\\bin\\\\}}}$, these are the +file `nbdemetra.exe` (version 32-bit) and `nbdemetra64.exe` (version +64-bit). + +ℹ Advice: If you want to use several versions of JDemetra+ (v2.2.4, +v3.2.1, …), you can rename the unzipped folder in +${\textsf{\color{#006817}{\\\\nbdemetra-2.2.4\\\\}}}$ and +${\textsf{\color{#006817}{\\\\nbdemetra-3.2.1\\\\}}}$. + +ℹ️ Remark: You can create shortcuts to the executable files if you want +to launch them from another folder (Desktop, project folder…). + +## Installation of the cruncher + +The cruncher +([**JWSACruncher**](https://github.com/jdemetra/jwsacruncher)) is a tool +to update a workspace of JDemetra+ from the console, without opening +JDemetra+ Graphical User Interface. The update of a workspace can then +be done from another Software (**R** or **SAS** for example). + +To use the cruncher, you have to: + +- **Download** and **unzip** the file from the **latest stable** version + v2.2.4 here + +If you want to install and use a portable Java version (See section +[Java installation](#install_java)), you have to modify some parameters +to use the cruncher: + +- In the unzipped folder, **open** (for example with Notepad++) the file + `jwsacruncher.bat` present in the subfolder + ${\textsf{\color{#006817}{\\\\bin\\\\}}}$ (that is under + ${\textsf{\color{#006817}{jdemetra-cli-2.2.4\\\\bin\\\\}}}$ in the + version 2.2.3 of the cruncher) +- **Modify** the value of the variable `JAVACMD` at the line **71** + (currently `JAVACMD=java`) by the address towards the file `java.exe` + of the portable version. Then, if JPortable is installed under + ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$, the new line is + `if "%JAVACMD%"=="" set JAVACMD="C:\\Users\\Software\\Java64\\bin\\java"` + (for Java 8). + +# Installation of Java + +ℹ️ On Insee computers, Java is already installed in version 8. Then, +there is no need to install a portable version to use JDemetra+ in +version 2.2.4. + +## Java 8 + +To install Java 8, use the link +. If you use the +version 64-bit of JDemetra+, you should install the version jPortable +64-bit (at the bottom of the page). + +## Java 17 + +ℹ️ Remark + +The version 3.2.1 of JDemetra+ contains a JDemetra+ version 3.2.1 +contains a jdk 17 (java 17 version) packaged in +[.zip](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.1). So +to use the interface, it is not necessary to install Java 17. diff --git a/doc/Sheet_1_b_Tools_installation_advanced_EN.Rmd b/doc/JDemetra+_configuration_guide_EN.Rmd similarity index 56% rename from doc/Sheet_1_b_Tools_installation_advanced_EN.Rmd rename to doc/JDemetra+_configuration_guide_EN.Rmd index b5a83b3..8fde478 100644 --- a/doc/Sheet_1_b_Tools_installation_advanced_EN.Rmd +++ b/doc/JDemetra+_configuration_guide_EN.Rmd @@ -1,7 +1,7 @@ --- -title: "Tools installation for seasonal adjustment" +title: "Configuring JDemetra+ and related R tools" author: "Tanguy BARTHELEMY" -# date: "2023-01-17" +# date: "2024-04-05" output: github_document: default html_document: @@ -66,115 +66,30 @@ windows_path_color <- "#006817" \renewcommand{\xelatexemojipath}[1]{../xelatex-emoji/images/#1} -# Context {-} +## Context {-} -For seasonal adjustment we recommend using JDemetra+ algorithms +This document complements the [quick installation guide] (https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/JDemetra+_quick_installation_guide_EN.pdf) by providing more details on the configuration required to run JDemetra+ and related tools. -Thus, it is helpful to install the following tools: - -- JDemetra+ Graphical User Interface (X13-Arima and Tramo-Seats ) - -- **R** and Rstudio (which allow to access even more JDemetra+ algorithms) - -⚠️ No assistance in **SAS** language will be given. ⚠️ - - -# Preliminary {-} - -On the computers without administrator rights (*professional computer, for example*), it is recommended to create a folder **Software** under `r color_format("C:\\Users\\...\\Software", color = windows_path_color, url = FALSE)` or directly under `r color_format("C:\\Users\\Software", color = windows_path_color, url = FALSE)` where all software will be installed. +On computers without administrator rights (*professional computer, for example*), it is recommended to create a folder **Software** under `r color_format("C:\\Users\\...\\Software", color = windows_path_color, url = FALSE)` or directly under `r color_format("C:\\Users\\Software", color = windows_path_color, url = FALSE)` where all software will be installed. ⚠️ Warning: when we specify an **absolute** path for a software (JDemetra+, Java, **R**, ...) in a program, a shortcut, a variable, ..., it must be modified each time any root repository is moved. -# Installation of [JDemetra+](https://github.com/jdemetra/jdemetra-app) - -JDemetra+ is a collection of Java programs used for time series analysis and more specifically for seasonal adjustment. JDemetra+ is delivered in the form of an GUI (Graphical User Interface) but there are **R** packages developed to be used with **R** as well as a cruncher (executable). - -## Version of JDemetra+ and dependencies - -JDemetra+ is downloadable from the [github link](https://github.com/jdemetra/jdemetra-app/releases) of the application: `r color_format("https://github.com/jdemetra/jdemetra-app/releases", color = html_color, url = TRUE)`. - -The last release ([v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.3)) dates from January 31, 2023. It is the last **stable** version of JDemetra+. **This version should be downloaded and must be used in production.** - -There is one more version of JDemetra+ which are only at a **test** stage: - -- [v3.2.2](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2): the new JDemetra+ version with new features and a new GUI +## Installation of JDemetra+ Graphical user interface -JDemetra+ v2.2.4 require Java version $\geq 8$ while v3.2.2 requires Java version $\geq 17$: - -| JDemetra+ version | Java version | -|-------------------|--------------| -| v2.2.4 | $\geq 8$ | -| v3.2.2 | $\geq 17$ | - -In the following procedure, the installation processes of this 2 versions are the same. You just have to repeat them for each version you want to install. - - -## Installation process - -There are two possibilities for installing: - -- **Download and execute** the `.exe` file which requires administrator rights -- **Download** and **unzip** the compressed folder `.zip` that allows to get a portable version of the software - -⚠️ Warning: for the second option, you need to **download** the compressed folder `jdemetra+-2.2.4-bin.zip` (for the version 2.2.4 for example) and **not** the folder `Source code (zip)`. - -The Software is in the folder `r color_format("\\nbdemetra\\bin\\", color = windows_path_color, url = FALSE)`, these are the file `nbdemetra.exe` (version 32-bit) and `nbdemetra64.exe` (version 64-bit). - -ℹ Advice: If you want to use several versions of JDemetra+ (v2.2.4, v3.2.2, ...), you can rename the unzipped folder in `r color_format("\\nbdemetra-2.2.4\\", color = windows_path_color, url = FALSE)` and `r color_format("\\nbdemetra-3.2.2\\", color = windows_path_color, url = FALSE)`. - -ℹ️ Remark: You can create shortcuts to the executable files if you want to launch them from another folder (Desktop, project folder...). +To install [JDemetra+ Graphical User Interface](https://github.com/jdemetra/jdemetra-app) see the [quick installation guide] (https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/JDemetra+_quick_installation_guide_EN.pdf) ## Installation of the cruncher -The cruncher ([**JWSACruncher**](https://github.com/jdemetra/jwsacruncher)) is a tool to update a workspace of JDemetra+ from the console, without opening JDemetra+ Graphical User Interface. The update of a workspace can then be done from another Software (**R** or **SAS** for example). - -To use the cruncher, you have to: +To install [JDemetra+ cruncher](https://github.com/jdemetra/jdemetra-app) see the [quick installation guide] (https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/JDemetra+_quick_installation_guide_EN.pdf) -- **Download** and **unzip** the file from the **latest stable** version v2.2.4 here `r color_format("https://github.com/jdemetra/jwsacruncher/releases", color = html_color, url = TRUE)` -If you want to install and use a portable Java version (See section [Java installation](#install_java)), you have to modify some parameters to use the cruncher: +## Installation of **R** and Rstudio -- In the unzipped folder, **open** (for example with Notepad++) the file `jwsacruncher.bat` present in the subfolder `r color_format("\\bin\\", color = windows_path_color, url = FALSE)` (that is under `r color_format("jdemetra-cli-2.2.4\\bin\\", color = windows_path_color, url = FALSE)` in the version 2.2.3 of the cruncher) -- **Modify** the value of the variable `JAVACMD` at the line **71** (currently `JAVACMD=java`) by the address towards the file `java.exe` of the portable version. Then, if JPortable is installed under `r color_format("C:\\Users\\Software", color = windows_path_color, url = FALSE)`, the new line is `if "%JAVACMD%"=="" set JAVACMD="C:\\Users\\Software\\Java64\\bin\\java"` (for Java 8). - - -# Installation of Java {#install_java} - -ℹ️ On Insee computers, Java is already installed in version 8. Then, there is no need to install a portable version to use JDemetra+ in version 2.2.4. - -## Java 8 - -To install Java 8, use the link `r color_format("https://portableapps.com/apps/utilities/java_portable", color = html_color, url = TRUE)`. If you use the version 64-bit of JDemetra+, you should install the version jPortable 64-bit (at the bottom of the page). - - -## Java 17 - -### Remark - -The version 3.2.2 of JDemetra+ contains a -JDemetra+ version 3.2.2 contains a jdk 17 (java 17 version) packaged in [.zip](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2). So to use the interface, it is not necessary to install Java 17. - -On the other hand, to use R packages in version 3 without downloading the GUI (in version 3.2.2), it is mandatory to have java >= 17 and therefore to install it yourself. - -### Installation - -To install Java 17, you need to head over to `r color_format("https://whichjdk.com/", color = html_color, url = TRUE)`. - -- **Download** the version `Compressed Archive` of Windows (`r color_format("https://whichjdk.com/", color = html_color, url = TRUE)`) -- **Unzip** the folder `r color_format("jdk-17.0.6", color = windows_path_color, url = FALSE)` under `r color_format("C:\\Users\\Software", color = windows_path_color, url = FALSE)` (for example) - -After a Java installation (in version 8, 17 or other), you need to: - -- **Modify** the environment variable `PATH` of Rstudio and of Windows and `JAVA_HOME` from Rstudio (See section [Environment variables](#var_env)) - - -# Installation of **R** and Rstudio - -The JDemetra+ features are available on **R** via **R** packages. +The JDemetra+ algorithms can be accessed in **R** via **R** packages. To use **R**, it is better to use an IDE like Rstudio. All the executable files to download are under `r color_format("https://posit.co/download/rstudio-desktop/#download", color = html_color, url = TRUE)`. -## Installation of **R** +### Installation of **R** To install **R**, you should: @@ -182,7 +97,7 @@ To install **R**, you should: - **Execute** the executable to parameter and install **R**. -## Installation of Rstudio +### Installation of Rstudio **Download** the last Rstudio version (under `r color_format("https://posit.co/download/rstudio-desktop/#download", color = html_color, url = TRUE)`) and the **installer**. @@ -192,7 +107,7 @@ If the installation via the file `.exe` fails (because it requires higher rights - **Create a shortcut** of the file `rstudio.exe` on the Desktop. -## Installation of **R** packages +### Installation of **R** packages To install a **R** package, there are several methods: @@ -201,7 +116,7 @@ To install a **R** package, there are several methods: - Or you have to retrieve the package from a folder (binary format) (`.zip`) and then install it with the function `install.packages()`{.r} with the arguments `repos = NULL, type = "binary"`. -### In version 2 +#### R packages for JDemetra+ version 2.2.4 The packages in version 2 are: @@ -232,7 +147,7 @@ install.packages("JDCruncheR", repos = "https://nexus.insee.fr/repository/r-publ ``` -### In version 3 +#### R packages for JDemetra+ version 3.x Currently version 3 packages are NOT on CRAN. To install them, you need to go through Github: @@ -263,41 +178,10 @@ remotes::install_github("AQLT/ggdemetra3") ``` -### AUS (Insee server) case - -### Cas AUS - -To install a package on AUS, you can't use the function `install_github()`{.r}. Therefore: - - -- either the package is on CRAN or on AUS, it can be installed with the function `install.packages()`{.r} and with the argument `repos = "https://nexus.insee.fr/repository/r-public/"`{.r} -- or the package is not available and it must be downloaded at the binary format (`.zip`). For this you have to look for the compressed folder `.zip` under GitHub. +## Environment variables {#var_env} -Example for the package [**{rjd3toolkit}**]{.RPackages}, you can install the package: -- on the nexus with the following code: - - ```{r, echo = TRUE, eval = FALSE} - install.packages("rjd3toolkit", repos = "https://nexus.insee.fr/repository/r-public/") - ``` - -- you need to search under `r color_format("https://github.com/rjdemetra/rjd3toolkit/releases/tag/v3.2.2", color = html_color, url = TRUE)` (*release* Section) - - ```{r, echo = TRUE, eval = FALSE} - install.packages("path/.../rjd3toolkit_3.2.2.zip ", repos = NULL, type = "binary") - ``` - -- with the binary format `rjd3toolkit_3.2.2.zip` under `r color_format("https://github.com/rjdemetra/rjd3toolkit/releases/tag/v3.2.2", color = html_color, url = TRUE)` (*release* Section), then launch the installation code: - - ```{r, echo = TRUE, eval = FALSE} - install.packages("path/to/the/binary/package/.../rjd3toolkit_3.2.2.zip ", repos = NULL, type = "binary") - ``` - - -# Environment variables {#var_env} - - -## In Rstudio +### In Rstudio To add environment variables in Rstudio, you need to add the variable's name and the variable's value. There are 2 ways to fill it: @@ -315,66 +199,6 @@ There are 2 ways to fill it: - **Save** the file -### Proxy - -ℹ️ On Insee computers, you need to **configure** the proxy and parameters of Software localisation under Rstudio. The two ways to do it: - -First method (with the `.Renviron`): - -- **Launch** the code `file.edit("~/.Renviron")`{.r} or `usethis::edit_r_environ()`{.r} (with the package **usethis** and the argument `scope` which egals `"user"`{.r} or `"project"`{.r} if you are in a R project) -- **Add** the parameters (news lines): - - ```{.Code} - http_proxy = http://proxy-rie.http.insee.fr:8080/ - https_proxy = http://proxy-rie.http.insee.fr:8080/ - ``` - -- **Save** and **close** the file - -Second method (with the `.Rprofile`) : - -- **Launch** the code `file.edit("~/.Rprofile")`{.r} or `usethis::edit_r_profile()`{.r} (with the package **usethis** and the argument `scope` which egals `"user"`{.r} or `"project"`{.r} if you are in a R project) -- **Add** the next lines: - - ```{r, echo = TRUE, eval = FALSE} - Sys.setenv("http_proxy" = "http://proxy-rie.http.insee.fr:8080/") - Sys.setenv("https_proxy" = "http://proxy-rie.http.insee.fr:8080/") - ``` - -- **Save** the file - - -### JAVA_HOME - -If a new Java version has been installed, you should inform Rstudio of the Java installation localisation. For this, you should do as to parameter the proxy. The name of the variable is `JAVA_HOME` and the value of the variable is `"C:/Users/Software/Java17/jdk17"`{.r} (according to where your java installation is). - - -## In Windows - -In Windows, it could be useful to fill also the environnement variables. - - -### Proxy - -For the environment variables `http_proxy` and `https_proxy` for Windows, follow these steps: - -- Search for "Environment variables" -- Click on the application that appears. -- Add the variables `http_proxy` and `https_proxy` if they don't exist, and modify them if they already do: - -![](../img/modify_proxy.png) - - -### JAVA_HOME - -Similarly for the environment variable `JAVA_HOME` for Windows, you have to: - -- Search for "Environment variables" -- Click on the application that appears. -- Add the variable `JAVA_HOME` if it doesn't exist, and modify is if it already does: - -![](../img/modify_java_home.png) - ### PATH @@ -420,7 +244,7 @@ According to the result, the version is 32 bits or 64 bits : More information on the variable `PATH` via the page `r color_format("https://java.com/fr/download/help/path.xml", color = html_color, url = TRUE)`. -# Verifications +## Check your set up To ensure that everything works fine, you can launch some example of **R** code and check that there is no error: @@ -459,7 +283,7 @@ system("java -version") ``` -# Optional installations +## Optional installations Some supplementary installations are optional (that is they are no mandatory but bring external features): @@ -467,9 +291,9 @@ Some supplementary installations are optional (that is they are no mandatory but - [Rtools](https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html) to develop **R** packages and compile the code -# Problems you may encounter +## Problems you may encounter -## Problems installing **R** packages +### Problems installing **R** packages If you get the following error while installing **R** packages: @@ -502,7 +326,7 @@ There are two solutions: ℹ️ More information: `r color_format("https://github.com/jdemetra/rjdemetra/wiki/Installation-manual", color = html_color, url = TRUE)` -## The command `library("RJDemetra")`{.r} returns an error message +### The command `library("RJDemetra")`{.r} returns an error message The package [**{RJDemetra]{.RPackages} requires Java version 8 or higher to work. If another package has been loaded before [**{RJDemetra}**]{.RPackages} via the function `library()`{.r} and which doesn't requires an updated Java version, then an old Java version will be used during all the session (**R** is refractory to in-session version change). In case of using [**{RJDemetra}**]{.RPackages} in a program, you have to specify at the very beginning of the program that **R** must use Java version 8, via the command: @@ -521,12 +345,12 @@ library("RJDemetra") Else you have to restart a new **R** session. -## `Error array index = -1` +### `Error array index = -1` The message of the type `Error array index = -1` tells that an auxiliary variable is not found. It can be calendar regressor or other user defined variables (Easter effect, PSO = pure seasonal outlier...). -## The function `cruncher_and_param(...)`{.r} of the [**{JDCruncheR}**]{.RPackages} package returns an error +### The function `cruncher_and_param(...)`{.r} of the [**{JDCruncheR}**]{.RPackages} package returns an error When you use the function `cruncher_and_param(...)`{.r} of the [**{JDCruncheR}**]{.RPackages} package, you can get the following error: diff --git a/doc/JDemetra+_configuration_guide_EN.md b/doc/JDemetra+_configuration_guide_EN.md new file mode 100644 index 0000000..9dd81e0 --- /dev/null +++ b/doc/JDemetra+_configuration_guide_EN.md @@ -0,0 +1,364 @@ +Configuring JDemetra+ and related R tools +================ +Tanguy BARTHELEMY + +## Context + +This document complements the \[quick installation guide\] +() +by providing more details on the configuration required to run JDemetra+ +and related tools. + +On computers without administrator rights (*professional computer, for +example*), it is recommended to create a folder **Software** under +${\textsf{\color{#006817}{C:\\\\Users\\\\...\\\\Software}}}$ or directly +under ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$ where all +software will be installed. + +⚠️ Warning: when we specify an **absolute** path for a software +(JDemetra+, Java, **R**, …) in a program, a shortcut, a variable, …, it +must be modified each time any root repository is moved. + +## Installation of JDemetra+ Graphical user interface + +To install [JDemetra+ Graphical User +Interface](https://github.com/jdemetra/jdemetra-app) see the \[quick +installation guide\] +() + +## Installation of the cruncher + +To install [JDemetra+ +cruncher](https://github.com/jdemetra/jdemetra-app) see the \[quick +installation guide\] +() + +## Installation of **R** and Rstudio + +The JDemetra+ algorithms can be accessed in **R** via **R** packages. To +use **R**, it is better to use an IDE like Rstudio. All the executable +files to download are under +. + +### Installation of **R** + +To install **R**, you should: + +- **Download** the binary file `R-4.3.2-win.exe` under + +- **Execute** the executable to parameter and install **R**. + +### Installation of Rstudio + +**Download** the last Rstudio version (under +) and the +**installer**. + +If the installation via the file `.exe` fails (because it requires +higher rights (administrator, elevation, …), we will get a portable +version of the Software. To do this: + +- **Download** and **unzip** the compressed folder `.zip` in a folder + named “Rstudio” (under + ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$) +- **Create a shortcut** of the file `rstudio.exe` on the Desktop. + +### Installation of **R** packages + +To install a **R** package, there are several methods: + +- Either it is on CRAN and you can install it directly with the function + `install.packages()` +- Or it is on Github and you can install it directly with the function + `install_github()` from the package **remotes** +- Or you have to retrieve the package from a folder (binary format) + (`.zip`) and then install it with the function `install.packages()` + with the arguments `repos = NULL, type = "binary"`. + +#### R packages for JDemetra+ version 2.2.4 + +The packages in version 2 are: + +| Name | Available on CRAN | Available on AUS | Github link | +|---------------|-------------------|------------------|----------------------------------------------| +| RJDemetra | ✔️ | ✔️ | | +| rjdworkspace | ❌ | ✔️ | | +| JDCruncheR | ❌ | ✔️ | | +| rjwsacruncher | ✔️ | ✔️ | | +| rjdmarkdown | ✔️ | ✔️ | | + +The packages installation code is below: + +``` r +# If remotes is not installed +# install.packages("remotes") + +install.packages("RJDemetra") +install.packages("rjwsacruncher") +install.packages("rjdmarkdown") + +remotes::install_github("InseeFrLab/rjdworkspace") +remotes::install_github("InseeFr/JDCruncheR") + +# Under AUS and on Insee computers +install.packages("rjdworkspace", repos = "https://nexus.insee.fr/repository/r-public") +install.packages("JDCruncheR", repos = "https://nexus.insee.fr/repository/r-public") +``` + +#### R packages for JDemetra+ version 3.x + +Currently version 3 packages are NOT on CRAN. To install them, you need +to go through Github: + +``` r +# If remotes is not installed +# install.packages("remotes") + +remotes::install_github("rjdemetra/rjd3toolkit") + +remotes::install_github("rjdemetra/rjd3x13") +remotes::install_github("rjdemetra/rjd3tramoseats") + +remotes::install_github("rjdemetra/rjd3providers") +remotes::install_github("rjdemetra/rjdemetra3") + +remotes::install_github("rjdemetra/rjd3filters") +remotes::install_github("rjdemetra/rjd3x11plus") + +remotes::install_github("rjdemetra/rjd3sts") +remotes::install_github("rjdemetra/rjd3highfreq") +remotes::install_github("rjdemetra/rjd3stl") + +remotes::install_github("rjdemetra/rjd3revisions") +remotes::install_github("rjdemetra/rjd3bench") +remotes::install_github("rjdemetra/rjd3nowcasting") + +remotes::install_github("AQLT/ggdemetra3") +``` + +## Environment variables + +### In Rstudio + +To add environment variables in Rstudio, you need to add the variable’s +name and the variable’s value. There are 2 ways to fill it: + +- Using the `.Renviron` file: + + - **Launch** the code `file.edit("~/.Renviron")` or + `usethis::edit_r_environ()` (with the package **usethis** and the + argument `scope` which egals `"user"` or `"project"` if you are in a + R project) + - **Add** the variables to the file (with new lines) + - **Save** the file + +- Using the `.Rprofile` file: + + - **Launch** the code `file.edit("~/.Rprofile")` or + `usethis::edit_r_profile()` (with the package **usethis** and the + argument `scope` which egals `"user"` or `"project"` if you are in a + R project) + - **Add** the variables with the fonction `Sys.setenv()` (with new + lines) + - **Save** the file + +### PATH + +The environment variable `PATH` in **R** is used to indicate to **R** +where to find the executable files. + +When you install a new software (for example JDemetra+, Rtools, Java…) +that Rstudio uses, you have to modify this environment variable: + +- **Get** the actual value of the variable `PATH` via the **R** command + `Sys.getenv("PATH")` (Rstudio returns a succession of addresses as + `C:/WINDOWS/system32;C:/WINDOWS`) + +- **Copy paste** this value after `PATH =` and add the paths towards the + folder ${\textsf{\color{#006817}{\\\\bin\\\\}}}$ (binary) of the + software newly installed, by separating them with semicolon (without + space before or after). For the Rtools installation, the path is + ${\textsf{\color{#006817}{C:\\\\rtools42\\\\mingw64\\\\bin}}}$ + (depending on where Rtools was installed). You have to add + `C:\\rtools42\\mingw64\\bin` or `C:/rtools42/mingw64/bin` (In **R**, + `\` is a special character, so you have to replace the `\` by `/` or + by `\\`). The path becomes + `C:/WINDOWS/system32;C:/WINDOWS;C:/rtools42/mingw64/bin`. + +- **Modify** the variable with the function `Sys.setenv()`. For Rtools, + the command to launch is: + + ``` r + Sys.setenv(PATH = "C:/WINDOWS/system32;C:/WINDOWS;C:/rtools42/mingw64/bin") + ``` + +ℹ️ NB: Generally a 32 bits version and a 64 bits version are available +for downloading and installing a software. You need to check your +processor type of your operating system to choose the right folder to +download. + +For this, you can launch the command: + +``` r +Sys.getenv("R_ARCH") +Sys.info()[["machine"]] +``` + +According to the result, the version is 32 bits or 64 bits : + +| Version | Output | +|---------|--------| +| 64 bits | /x64 | +| | x86-64 | +| | | +| 32 bits | /i386 | +| | x86_32 | + +More information on the variable `PATH` via the page +. + +## Check your set up + +To ensure that everything works fine, you can launch some example of +**R** code and check that there is no error: + +``` r +library("RJDemetra") + +myseries <- ipi_c_eu[, "FR"] +x13_model <- x13(myseries) # X-13ARIMA method +ts_model <- tramoseats(myseries) # TRAMO-SEATS method + +# Basic plot with the original series, the trend and the SA series +plot(x13_model, type_chart = "sa-trend") +``` + +To check the Java version we are using on **R**, you can try to install +and use the package **rJava** and launch the command below: + +``` r +# If rJava is not installed +install.packages("rJava") +``` + +If the installation of **rJava** returns an error, it means that Java +was incorrectly installed or incorrectly configured on **R**. You need +to get back to the section [Environment variables](#var_env). + +This block of code tests the Java version with which **R** works: + +``` r +library("rJava") +.jinit() +.jcall("java/lang/System", "S", "getProperty", "java.runtime.version") +``` + +Finally, you can consult the Java version installed with which Windows +works (it doesn’t matter to us): + +``` r +system("java -version") +``` + +## Optional installations + +Some supplementary installations are optional (that is they are no +mandatory but bring external features): + +- [Miktek](https://miktex.org/howto/install-miktex) to produce PDF + document with Latex +- [Rtools](https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html) + to develop **R** packages and compile the code + +## Problems you may encounter + +### Problems installing **R** packages + +If you get the following error while installing **R** packages: + +``` r +install.packages("RJDemetra") +``` + + ## Error in eval(expr, envir, enclos): Erreur: the chargement a échoué + ## Exécution arrêtée + ## *** arch - x64 + +The problem doesn’t come from Java but from the **R** package. By +default, the package is installed from a “source” file, it means that +the package is recompiled. For some computing reasons, when compiling by +default, **R** uses the system (Windows) parameters (which doesn’t have +necessarily have the correct Java version). + +There are two solutions: + +- Compile the package by installing from the binary file: + + ``` r + install.packages("RJDemetra", type = "binary") + ``` + +- Specify that we want to use the local parameters: + + ``` r + install.packages("RJDemetra", type = "source", INSTALL_opts = "--no-multiarch") + ``` + +ℹ️ More information: + + +### The command `library("RJDemetra")` returns an error message + +The package \*\*{RJDemetra requires Java +version 8 or higher to work. If another package has been loaded before +**{RJDemetra}** via the function +`library()` and which doesn’t requires an updated Java version, then an +old Java version will be used during all the session (**R** is +refractory to in-session version change). In case of using +**{RJDemetra}** in a program, you have to +specify at the very beginning of the program that **R** must use Java +version 8, via the command: + +``` r +# Where Java is installed +Sys.setenv(JAVA_HOME = "C:/Users/Software/Java17/jdk17") +``` + +or load **{RJDemetra}** first + +``` r +# At the beginning of program +library("RJDemetra") +``` + +Else you have to restart a new **R** session. + +### `Error array index = -1` + +The message of the type `Error array index = -1` tells that an auxiliary +variable is not found. It can be calendar regressor or other user +defined variables (Easter effect, PSO = pure seasonal outlier…). + +### The function `cruncher_and_param(...)` of the **{JDCruncheR}** package returns an error + +When you use the function `cruncher_and_param(...)` of the +**{JDCruncheR}** package, you can get the +following error: + + ## Error in eval(expr, envir, enclos): Error in cruncher(workspace = workspace, cruncher_bin_directory = cruncher_bin_directory, : + ## There is an error in the path to the cruncher bin folder + +That means that the path to the cruncher is incorrectly configured. To +solve this, you need to specify to R the path to the cruncher at the +start of the program withe the function `options(...)` : + +``` r +options(cruncher_bin_directory = "C:/Users/Software/jwsacruncher-2.2.4-bin/bin") +``` + +To check that the path is valid, you could use the function +`getOption(...)` : + +``` r +getOption("cruncher_bin_directory") +``` diff --git a/doc/JDemetra+_quick_installation_guide_EN.Rmd b/doc/JDemetra+_quick_installation_guide_EN.Rmd new file mode 100644 index 0000000..42cb3a3 --- /dev/null +++ b/doc/JDemetra+_quick_installation_guide_EN.Rmd @@ -0,0 +1,140 @@ +--- +title: "Installing JDemetra+" +author: "Tanguy BARTHELEMY" +# date: "2024-04-04" +output: + github_document: default + html_document: + df_print: paged + number_sections: TRUE + highlight: "arrow" + theme: "readable" + css: "style.css" + pdf_document: + includes: + in_header: + - ../xelatex-emoji/xelatexemoji.sty + extra_dependencies: ["url"] + number_sections: TRUE + highlight: "arrow" + latex_engine: xelatex +always_allow_html: true +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` + +```{r, echo = FALSE, eval = TRUE} +html_color <- "#000cff" +windows_path_color <- "#006817" + +color_format <- function(x, color, url = TRUE) { + color_name <- deparse(substitute(color)) + output_format <- knitr::opts_knit$get("rmarkdown.pandoc.to") + + x <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) + + if (output_format == "latex") { + x <- x |> gsub(pattern = "#", replacement = "\\#", fixed = TRUE) + ret <- paste("\\textcolor{", color_name, ifelse(url, "}{\\url{", "}{\\nolinkurl{"), x, ifelse(url, "}}", "}}"), sep = "") + } else if (output_format == "html") { + ret <- paste("", x, "", sep = "") + } else if (output_format == "gfm+tex_math_dollars-yaml_metadata_block") { + if (url) { + ret <- paste("[", x, "](", x, ")", sep = "") + } else { + ret <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) + ret <- paste("${\\textsf{\\color{", color, "}{", ret, "}}}$", sep = "") + } + } else { + ret <- x + } + + return(ret) +} +``` + +```{r, echo = FALSE, eval = TRUE} +html_color <- "#000cff" +windows_path_color <- "#006817" +``` + +\definecolor{html_color}{HTML}{000cff} +\definecolor{windows_path_color}{HTML}{006817} + +\renewcommand{\xelatexemojipath}[1]{../xelatex-emoji/images/#1} + +## Context + +This is a quick guide on how to install [JDemetra+](https://jdemetra-new-documentation.netlify.app/) Graphical User Interface, Cruncher and related R packages. + +If you need more information on how to configure your computer, you should read this +more [detailed guide](https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/JDemetra+_configuration_guide_EN.pdf) + +## Installing the Graphical User Interface (GUI) + +You can find the latest releases + +- in the v2.x family: [here](https://github.com/jdemetra/jdemetra-app/releases) + +As of April 2024, the latest version is [v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.4) + +Scroll down the page, download and unzip the file *jdemetra-2.2.4-bin.zip*. + +To start the application, run the file **nbdemetra64.exe** located in the following subfolder "... \jdemetra-2.2.4-bin\nbdemetra\bin" + +ℹ️ Remark: You can create shortcuts to the executable files if you want to launch them from another folder (Desktop, project folder...). + + +- in the v3.x family: [here](https://github.com/jdemetra/jdplus-main/releases) + +As of April 2024, the latest version is ([v3.2.2](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2)) + +Scroll down the page, download and unzip the file if you use Windows *jdemetra-standalone-3.2.2-windows-x86_64.zip*. + +To start the application, run the file **nbdemetra64.exe** located in the following subfolder "... \jdemetra-standalone-3.2.2-windows-x86_64\nbdemetra\bin" + +Version 3.x requires Java 17 or higher, *jdemetra-standalone-3.2.2-windows-x86_64.zip* contains a portable version of Java 21, so you don't have to deal with this issue on your computer. + +R packages related to version 3.x (rjd3...) also require Java 17 or higher, you can (and should) use the portable version provided with the graphical user interface to run them, this is explained [here](#Rconfig). + +## Installing additional plugins + +To benefit from extended features of the graphical user interface installing plug-ins can be required. +This procedure is detailed [here](https://jdemetra-new-documentation.netlify.app/t-plug-ins) and [here](https://jdemetra-new-documentation.netlify.app/t-gui-sa-modelling-features) in the online documentation. + +In the **v2.x family** some of the additional features are: + - Benchmarking and Temporal disaggregation + - Nowcasting + +In the **v3.x family** some of the additional features are: + - Benchmarking and Temporal disaggregation + - Seasonal adjustment of high frequency data + - Additional algorithms for seasonal adjustment + + +## Installing the cruncher + +To install the [Cruncher](https://jdemetra-new-documentation.netlify.app/t-production-tools-cruncher-qr) : + +- in v2, go to the [**JWSACruncher**] page(https://github.com/jdemetra/jwsacruncher) and **download** and **unzip** the compressed folder `jwsacruncher-2.2.4-bin.zip`. + +- in v3, go to the [**jdplus-main**](https://github.com/jdemetra/jdplus-main) page and **download** and **unzip** the compressed folder `jwsacruncher-standalone-3.2.2-windows-x86_64.zip`. + + +## Configuration to run rjd3 packages {#Rconfig} + +rjd3 suite of packages is available [here](https://github.com/rjdemetra) + +Installation procedure and example are provided in the readme files. + +To use the v3 packages in R, you need to specify the path to Java 17 or higher. + +You can use the version of Java that comes with the graphical user interface, as shown in the example below. + +- Run this line at the beginning of your programs (with the correct path where you installed JDemetra+) or configure your Renviron file as explained [here](https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/Sheet_1_b_Tools_installation_advanced_EN.pdf): + +```{r, echo = TRUE, eval = FALSE} +Sys.setenv("JAVA_HOME" = ".../jdemetra-standalone-3.2.2-windows-x86_64/nbdemetra/jdk-21.0.2+13-jre") +`` \ No newline at end of file diff --git a/doc/JDemetra+_quick_installation_guide_EN.md b/doc/JDemetra+_quick_installation_guide_EN.md new file mode 100644 index 0000000..8255a1f --- /dev/null +++ b/doc/JDemetra+_quick_installation_guide_EN.md @@ -0,0 +1,106 @@ +Installing JDemetra+ +================ +Tanguy BARTHELEMY + +## Context + +This is a quick guide on how to install +[JDemetra+](https://jdemetra-new-documentation.netlify.app/) Graphical +User Interface, Cruncher and related R packages. + +If you need more information on how to configure your computer, you +should read this more [detailed +guide](https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/JDemetra+_configuration_guide_EN.pdf) + +## Installing the Graphical User Interface (GUI) + +You can find the latest releases + +- in the v2.x family: + [here](https://github.com/jdemetra/jdemetra-app/releases) + +As of April 2024, the latest version is +[v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.4) + +Scroll down the page, download and unzip the file +*jdemetra-2.2.4-bin.zip*. + +To start the application, run the file **nbdemetra64.exe** located in +the following subfolder “… .4-bin” + +ℹ️ Remark: You can create shortcuts to the executable files if you want +to launch them from another folder (Desktop, project folder…). + +- in the v3.x family: + [here](https://github.com/jdemetra/jdplus-main/releases) + +As of April 2024, the latest version is +([v3.2.2](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2)) + +Scroll down the page, download and unzip the file if you use Windows +*jdemetra-standalone-3.2.2-windows-x86_64.zip*. + +To start the application, run the file **nbdemetra64.exe** located in +the following subfolder “… -standalone-3.2.2-windows-x86_64” + +Version 3.x requires Java 17 or higher, +*jdemetra-standalone-3.2.2-windows-x86_64.zip* contains a portable +version of Java 21, so you don’t have to deal with this issue on your +computer. + +R packages related to version 3.x (rjd3…) also require Java 17 or +higher, you can (and should) use the portable version provided with the +graphical user interface to run them, this is explained +[here](#Rconfig). + +## Installing additional plugins + +To benefit from extended features of the graphical user interface +installing plug-ins can be required. This procedure is detailed +[here](https://jdemetra-new-documentation.netlify.app/t-plug-ins) and +[here](https://jdemetra-new-documentation.netlify.app/t-gui-sa-modelling-features) +in the online documentation. + +In the **v2.x family** some of the additional features are: - +Benchmarking and Temporal disaggregation - Nowcasting + +In the **v3.x family** some of the additional features are: - +Benchmarking and Temporal disaggregation - Seasonal adjustment of high +frequency data - Additional algorithms for seasonal adjustment + +## Installing the cruncher + +To install the +[Cruncher](https://jdemetra-new-documentation.netlify.app/t-production-tools-cruncher-qr) +: + +- in v2, go to the \[**JWSACruncher**\] + page() and **download** and + **unzip** the compressed folder `jwsacruncher-2.2.4-bin.zip`. + +- in v3, go to the + [**jdplus-main**](https://github.com/jdemetra/jdplus-main) page and + **download** and **unzip** the compressed folder + `jwsacruncher-standalone-3.2.2-windows-x86_64.zip`. + +## Configuration to run rjd3 packages + +rjd3 suite of packages is available [here](https://github.com/rjdemetra) + +Installation procedure and example are provided in the readme files. + +To use the v3 packages in R, you need to specify the path to Java 17 or +higher. + +You can use the version of Java that comes with the graphical user +interface, as shown in the example below. + +- Run this line at the beginning of your programs (with the correct path + where you installed JDemetra+) or configure your Renviron file as + explained + [here](https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/Sheet_1_b_Tools_installation_advanced_EN.pdf): + +``` r +Sys.setenv("JAVA_HOME" = ".../jdemetra-standalone-3.2.2-windows-x86_64/nbdemetra/jdk-21.0.2+13-jre") +`` +``` diff --git a/doc/Sheet_1_a_Tools_installation_EN.Rmd b/doc/Sheet_1_a_Tools_installation_EN.Rmd deleted file mode 100644 index 3c39288..0000000 --- a/doc/Sheet_1_a_Tools_installation_EN.Rmd +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "Tools installation for seasonal adjustment" -author: "Tanguy BARTHELEMY" -# date: "2023-01-17" -output: - github_document: default - html_document: - df_print: paged - number_sections: TRUE - highlight: "arrow" - theme: "readable" - css: "style.css" - pdf_document: - includes: - in_header: - - ../xelatex-emoji/xelatexemoji.sty - extra_dependencies: ["url"] - number_sections: TRUE - highlight: "arrow" - latex_engine: xelatex -always_allow_html: true ---- - -```{r setup, include=FALSE} -knitr::opts_chunk$set(echo = TRUE) -``` - -```{r, echo = FALSE, eval = TRUE} -html_color <- "#000cff" -windows_path_color <- "#006817" - -color_format <- function(x, color, url = TRUE) { - color_name <- deparse(substitute(color)) - output_format <- knitr::opts_knit$get("rmarkdown.pandoc.to") - - x <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) - - if (output_format == "latex") { - x <- x |> gsub(pattern = "#", replacement = "\\#", fixed = TRUE) - ret <- paste("\\textcolor{", color_name, ifelse(url, "}{\\url{", "}{\\nolinkurl{"), x, ifelse(url, "}}", "}}"), sep = "") - } else if (output_format == "html") { - ret <- paste("", x, "", sep = "") - } else if (output_format == "gfm+tex_math_dollars-yaml_metadata_block") { - if (url) { - ret <- paste("[", x, "](", x, ")", sep = "") - } else { - ret <- x |> gsub(pattern = "\\", replacement = "\\\\", fixed = TRUE) - ret <- paste("${\\textsf{\\color{", color, "}{", ret, "}}}$", sep = "") - } - } else { - ret <- x - } - - return(ret) -} -``` - -```{r, echo = FALSE, eval = TRUE} -html_color <- "#000cff" -windows_path_color <- "#006817" -``` - -\definecolor{html_color}{HTML}{000cff} -\definecolor{windows_path_color}{HTML}{006817} - -\renewcommand{\xelatexemojipath}[1]{../xelatex-emoji/images/#1} - -## Installation of JDemetra+ - -You can find the two current versions of JDemetra3 (v2 and v3): - -- in v2 : the last release ([v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.4)) -- in v3 : the last release ([v3.2.2](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2)) - -You just have to **Download** and **unzip** the compressed folder `jdemetra-standalone-3.2.2-windows-x86_64.zip` that allows to get a portable version of the software. - - -## Installation of the cruncher - -To install the installer the cruncher : - -- in v2, go on the page of [**JWSACruncher**](https://github.com/jdemetra/jwsacruncher) and **Download** and **unzip** the compressed folder `jwsacruncher-2.2.4-bin.zip` -- in v3, go on the page of [**jdplus-main**](https://github.com/jdemetra/jdplus-main) and **Download** and **unzip** the compressed folder `jwsacruncher-standalone-3.2.2-windows-x86_64.zip` - - -## Configuration of R and Rstudio - -To use the packages in v3 in R, you need to specify the path to Java 17. - -You need to execute this line at the beginning of your programs (with the correct path where you installed JDemetra+): - -```{r, echo = TRUE, eval = FALSE} -Sys.setenv("JAVA_HOME" = "path/to/nbdemetra-3.2.2/jdk-21.0.2+13-jre") -``` - diff --git a/doc/Sheet_1_a_Tools_installation_EN.md b/doc/Sheet_1_a_Tools_installation_EN.md new file mode 100644 index 0000000..cb42cc6 --- /dev/null +++ b/doc/Sheet_1_a_Tools_installation_EN.md @@ -0,0 +1,102 @@ +Installing JDemetra+ +================ +Tanguy BARTHELEMY + +## Context + +This is a quick guide on how to install +[JDemetra+](https://jdemetra-new-documentation.netlify.app/) Graphical +User Interface, Cruncher and related R packages. + +If you need more information on how to configure your computer, you +should read this more [detailed +guide](https://github.com/TanguyBarthelemy/JD-Tutorials/blob/master/Sheets/Sheet_1_b_Tools_installation_advanced_EN.pdf) + +## Installing the Graphical User Interface (GUI) + +You can find the latest releases + +- in the v2.x family: + [here](https://github.com/jdemetra/jdemetra-app/releases) + +As of April 2024, the latest version is +[v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.4) + +Scroll down the page, download and unzip the file +*jdemetra-2.2.4-bin.zip*. + +To start the application, run the file **nbdemetra64.exe** located in +the following subfolder “… .4-bin” + +- in the v3.x family: + [here](https://github.com/jdemetra/jdplus-main/releases) + +As of April 2024, the latest version is +([v3.2.2](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2)) + +Scroll down the page, download and unzip the file if you use Windows +*jdemetra-standalone-3.2.2-windows-x86_64.zip*. + +To start the application, run the file **nbdemetra64.exe** located in +the following subfolder “… -standalone-3.2.2-windows-x86_64” + +Version 3.x requires Java 17 or higher, +*jdemetra-standalone-3.2.2-windows-x86_64.zip* contains a portable +version of Java 21, so you don’t have to deal with this issue on your +computer. + +R packages related to version 3.x (rjd3…) also require Java 17 or +higher, you can (and should) use the portable version provided with the +graphical user interface to run them, this is explained +[here](#Rconfig). + +## Installing additional plugins + +To benefit from extended features of the graphical user interface +installing plug-ins can be required. This procedure is detailed +[here](https://jdemetra-new-documentation.netlify.app/t-plug-ins) and +[here](https://jdemetra-new-documentation.netlify.app/t-gui-sa-modelling-features) +in the online documentation. + +In the **v2.x family** some of the additional features are: - +Benchmarking and Temporal disaggregation - Nowcasting + +In the **v3.x family** some of the additional features are: - +Benchmarking and Temporal disaggregation - Seasonal adjustment of high +frequency data - Additional algorithms for seasonal adjustment + +## Installing the cruncher + +To install the +[Cruncher](https://jdemetra-new-documentation.netlify.app/t-production-tools-cruncher-qr) +: + +- in v2, go to the \[**JWSACruncher**\] + page() and **download** and + **unzip** the compressed folder `jwsacruncher-2.2.4-bin.zip`. + +- in v3, go to the + [**jdplus-main**](https://github.com/jdemetra/jdplus-main) page and + **download** and **unzip** the compressed folder + `jwsacruncher-standalone-3.2.2-windows-x86_64.zip`. + +## Configuration to run rjd3 packages + +rjd3 suite of packages is available \[here\] + +Installation procedure and exemple are provided in the readme files. + +To use the v3 packages in R, you need to specify the path to Java 17 or +higher. + +You can use the version of Java that comes with the graphical user +interface, as shown in the example below. + +- Run this line at the beginning of your programs (with the correct path + where you installed JDemetra+) or configure your Renviron file as + explained [here](): + +``` r +Sys.setenv("JAVA_HOME" = ".../jdemetra-standalone-3.2.2-windows-x86_64/nbdemetra/jdk-21.0.2+13-jre") +`` +``` diff --git a/doc/Sheet_1_b_Tools_installation_advanced_EN.md b/doc/Sheet_1_b_Tools_installation_advanced_EN.md new file mode 100644 index 0000000..6a3e15b --- /dev/null +++ b/doc/Sheet_1_b_Tools_installation_advanced_EN.md @@ -0,0 +1,606 @@ +Installing JDemetra+ and related tools: detailed version +================ +Tanguy BARTHELEMY + +# Context + +For seasonal adjustment we recommend using JDemetra+ algorithms + +Thus, it is helpful to install the following tools: + +- JDemetra+ Graphical User Interface (X13-Arima and Tramo-Seats ) + +- **R** and Rstudio (which allow to access even more JDemetra+ + algorithms) + +⚠️ No assistance in **SAS** language will be given. ⚠️ + +# Preliminary + +On the computers without administrator rights (*professional computer, +for example*), it is recommended to create a folder **Software** under +${\textsf{\color{#006817}{C:\\\\Users\\\\...\\\\Software}}}$ or directly +under ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$ where all +software will be installed. + +⚠️ Warning: when we specify an **absolute** path for a software +(JDemetra+, Java, **R**, …) in a program, a shortcut, a variable, …, it +must be modified each time any root repository is moved. + +# Installation of [JDemetra+](https://github.com/jdemetra/jdemetra-app) + +JDemetra+ is a collection of Java programs used for time series analysis +and more specifically for seasonal adjustment. JDemetra+ is delivered in +the form of an GUI (Graphical User Interface) but there are **R** +packages developed to be used with **R** as well as a cruncher +(executable). + +## Version of JDemetra+ and dependencies + +JDemetra+ is downloadable from the [github +link](https://github.com/jdemetra/jdemetra-app/releases) of the +application: . + +The last release +([v2.2.4](https://github.com/jdemetra/jdemetra-app/releases/tag/v2.2.3)) +dates from January 31, 2023. It is the last **stable** version of +JDemetra+. **This version should be downloaded and must be used in +production.** + +There is one more version of JDemetra+ which are only at a **test** +stage: + +- [v3.2.2](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2): + the new JDemetra+ version with new features and a new GUI + +JDemetra+ v2.2.4 requires Java version $\geq 8$ while v3.2.2 requires +Java version $\geq 17$: + +| JDemetra+ version | Java version | +|-------------------|--------------| +| v2.2.4 | $\geq 8$ | +| v3.2.2 | $\geq 17$ | + +In the following procedure, the installation processes of this 2 +versions are the same. You just have to repeat them for each version you +want to install. + +## Installation process + +There are two possibilities for installing: + +- **Download and execute** the `.exe` file which requires administrator + rights +- **Download** and **unzip** the compressed folder `.zip` that allows to + get a portable version of the software + +⚠️ Warning: for the second option, you need to **download** the +compressed folder `jdemetra+-2.2.4-bin.zip` (for the version 2.2.4 for +example) and **not** the folder `Source code (zip)`. + +The Software is in the folder +${\textsf{\color{#006817}{\\\\nbdemetra\\\\bin\\\\}}}$, these are the +file `nbdemetra.exe` (version 32-bit) and `nbdemetra64.exe` (version +64-bit). + +ℹ Advice: If you want to use several versions of JDemetra+ (v2.2.4, +v3.2.2, …), you can rename the unzipped folder in +${\textsf{\color{#006817}{\\\\nbdemetra-2.2.4\\\\}}}$ and +${\textsf{\color{#006817}{\\\\nbdemetra-3.2.2\\\\}}}$. + +ℹ️ Remark: You can create shortcuts to the executable files if you want +to launch them from another folder (Desktop, project folder…). + +## Installation of the cruncher + +The cruncher +([**JWSACruncher**](https://github.com/jdemetra/jwsacruncher)) is a tool +to update a workspace of JDemetra+ from the console, without opening +JDemetra+ Graphical User Interface. The update of a workspace can then +be done from another Software (**R** or **SAS** for example). + +To use the cruncher, you have to: + +- **Download** and **unzip** the file from the **latest stable** version + v2.2.4 here + +If you want to install and use a portable Java version (See section +[Java installation](#install_java)), you have to modify some parameters +to use the cruncher: + +- In the unzipped folder, **open** (for example with Notepad++) the file + `jwsacruncher.bat` present in the subfolder + ${\textsf{\color{#006817}{\\\\bin\\\\}}}$ (that is under + ${\textsf{\color{#006817}{jdemetra-cli-2.2.4\\\\bin\\\\}}}$ in the + version 2.2.3 of the cruncher) +- **Modify** the value of the variable `JAVACMD` at the line **71** + (currently `JAVACMD=java`) by the address towards the file `java.exe` + of the portable version. Then, if JPortable is installed under + ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$, the new line is + `if "%JAVACMD%"=="" set JAVACMD="C:\\Users\\Software\\Java64\\bin\\java"` + (for Java 8). + +# Installation of Java + +ℹ️ On Insee computers, Java is already installed in version 8. Then, +there is no need to install a portable version to use JDemetra+ in +version 2.2.4. + +## Java 8 + +To install Java 8, use the link +. If you use the +version 64-bit of JDemetra+, you should install the version jPortable +64-bit (at the bottom of the page). + +## Java 17 + +### Remark + +The version 3.2.2 of JDemetra+ contains a JDemetra+ version 3.2.2 +contains a jdk 17 (java 17 version) packaged in +[.zip](https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.2). So +to use the interface, it is not necessary to install Java 17. + +On the other hand, to use R packages in version 3 without downloading +the GUI (in version 3.2.2), it is mandatory to have java \>= 17 and +therefore to install it yourself. + +### Installation + +To install Java 17, you need to head over to . + +- **Download** the version `Compressed Archive` of Windows + () +- **Unzip** the folder ${\textsf{\color{#006817}{jdk-17.0.6}}}$ under + ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$ (for example) + +After a Java installation (in version 8, 17 or other), you need to: + +- **Modify** the environment variable `PATH` of Rstudio and of Windows + and `JAVA_HOME` from Rstudio (See section [Environment + variables](#var_env)) + +# Installation of **R** and Rstudio + +The JDemetra+ features are available on **R** via **R** packages. To use +**R**, it is better to use an IDE like Rstudio. All the executable files +to download are under +. + +## Installation of **R** + +To install **R**, you should: + +- **Download** the binary file `R-4.3.2-win.exe` under + +- **Execute** the executable to parameter and install **R**. + +## Installation of Rstudio + +**Download** the last Rstudio version (under +) and the +**installer**. + +If the installation via the file `.exe` fails (because it requires +higher rights (administrator, elevation, …), we will get a portable +version of the Software. To do this: + +- **Download** and **unzip** the compressed folder `.zip` in a folder + named “Rstudio” (under + ${\textsf{\color{#006817}{C:\\\\Users\\\\Software}}}$) +- **Create a shortcut** of the file `rstudio.exe` on the Desktop. + +## Installation of **R** packages + +To install a **R** package, there are several methods: + +- Either it is on CRAN and you can install it directly with the function + `install.packages()` +- Or it is on Github and you can install it directly with the function + `install_github()` from the package **remotes** +- Or you have to retrieve the package from a folder (binary format) + (`.zip`) and then install it with the function `install.packages()` + with the arguments `repos = NULL, type = "binary"`. + +### In version 2 + +The packages in version 2 are: + +| Name | Available on CRAN | Available on AUS | Github link | +|---------------|-------------------|------------------|----------------------------------------------| +| RJDemetra | ✔️ | ✔️ | | +| rjdworkspace | ❌ | ✔️ | | +| JDCruncheR | ❌ | ✔️ | | +| rjwsacruncher | ✔️ | ✔️ | | +| rjdmarkdown | ✔️ | ✔️ | | + +The packages installation code is below: + +``` r +# If remotes is not installed +# install.packages("remotes") + +install.packages("RJDemetra") +install.packages("rjwsacruncher") +install.packages("rjdmarkdown") + +remotes::install_github("InseeFrLab/rjdworkspace") +remotes::install_github("InseeFr/JDCruncheR") + +# Under AUS and on Insee computers +install.packages("rjdworkspace", repos = "https://nexus.insee.fr/repository/r-public") +install.packages("JDCruncheR", repos = "https://nexus.insee.fr/repository/r-public") +``` + +### In version 3 + +Currently version 3 packages are NOT on CRAN. To install them, you need +to go through Github: + +``` r +# If remotes is not installed +# install.packages("remotes") + +remotes::install_github("rjdemetra/rjd3toolkit") + +remotes::install_github("rjdemetra/rjd3x13") +remotes::install_github("rjdemetra/rjd3tramoseats") + +remotes::install_github("rjdemetra/rjd3providers") +remotes::install_github("rjdemetra/rjdemetra3") + +remotes::install_github("rjdemetra/rjd3filters") +remotes::install_github("rjdemetra/rjd3x11plus") + +remotes::install_github("rjdemetra/rjd3sts") +remotes::install_github("rjdemetra/rjd3highfreq") +remotes::install_github("rjdemetra/rjd3stl") + +remotes::install_github("rjdemetra/rjd3revisions") +remotes::install_github("rjdemetra/rjd3bench") +remotes::install_github("rjdemetra/rjd3nowcasting") + +remotes::install_github("AQLT/ggdemetra3") +``` + +### AUS (Insee server) case + +### Cas AUS + +To install a package on AUS, you can’t use the function +`install_github()`. Therefore: + +- either the package is on CRAN or on AUS, it can be installed with the + function `install.packages()` and with the argument + `repos = "https://nexus.insee.fr/repository/r-public/"` +- or the package is not available and it must be downloaded at the + binary format (`.zip`). For this you have to look for the compressed + folder `.zip` under GitHub. + +Example for the package +**{rjd3toolkit}**, you can install the +package: + +- on the nexus with the following code: + + ``` r + install.packages("rjd3toolkit", repos = "https://nexus.insee.fr/repository/r-public/") + ``` + +- you need to search under + + (*release* Section) + + ``` r + install.packages("path/.../rjd3toolkit_3.2.2.zip ", repos = NULL, type = "binary") + ``` + +- with the binary format `rjd3toolkit_3.2.2.zip` under + + (*release* Section), then launch the installation code: + + ``` r + install.packages("path/to/the/binary/package/.../rjd3toolkit_3.2.2.zip ", repos = NULL, type = "binary") + ``` + +# Environment variables + +## In Rstudio + +To add environment variables in Rstudio, you need to add the variable’s +name and the variable’s value. There are 2 ways to fill it: + +- Using the `.Renviron` file: + + - **Launch** the code `file.edit("~/.Renviron")` or + `usethis::edit_r_environ()` (with the package **usethis** and the + argument `scope` which egals `"user"` or `"project"` if you are in a + R project) + - **Add** the variables to the file (with new lines) + - **Save** the file + +- Using the `.Rprofile` file: + + - **Launch** the code `file.edit("~/.Rprofile")` or + `usethis::edit_r_profile()` (with the package **usethis** and the + argument `scope` which egals `"user"` or `"project"` if you are in a + R project) + - **Add** the variables with the fonction `Sys.setenv()` (with new + lines) + - **Save** the file + +### Proxy + +ℹ️ On Insee computers, you need to **configure** the proxy and +parameters of Software localisation under Rstudio. The two ways to do +it: + +First method (with the `.Renviron`): + +- **Launch** the code `file.edit("~/.Renviron")` or + `usethis::edit_r_environ()` (with the package **usethis** and the + argument `scope` which egals `"user"` or `"project"` if you are in a R + project) + +- **Add** the parameters (news lines): + + ``` Code + http_proxy = http://proxy-rie.http.insee.fr:8080/ + https_proxy = http://proxy-rie.http.insee.fr:8080/ + ``` + +- **Save** and **close** the file + +Second method (with the `.Rprofile`) : + +- **Launch** the code `file.edit("~/.Rprofile")` or + `usethis::edit_r_profile()` (with the package **usethis** and the + argument `scope` which egals `"user"` or `"project"` if you are in a R + project) + +- **Add** the next lines: + + ``` r + Sys.setenv("http_proxy" = "http://proxy-rie.http.insee.fr:8080/") + Sys.setenv("https_proxy" = "http://proxy-rie.http.insee.fr:8080/") + ``` + +- **Save** the file + +### JAVA_HOME + +If a new Java version has been installed, you should inform Rstudio of +the Java installation localisation. For this, you should do as to +parameter the proxy. The name of the variable is `JAVA_HOME` and the +value of the variable is `"C:/Users/Software/Java17/jdk17"` (according +to where your java installation is). + +## In Windows + +In Windows, it could be useful to fill also the environnement variables. + +### Proxy + +For the environment variables `http_proxy` and `https_proxy` for +Windows, follow these steps: + +- Search for “Environment variables” +- Click on the application that appears. +- Add the variables `http_proxy` and `https_proxy` if they don’t exist, + and modify them if they already do: + +![](../img/modify_proxy.png) + +### JAVA_HOME + +Similarly for the environment variable `JAVA_HOME` for Windows, you have +to: + +- Search for “Environment variables” +- Click on the application that appears. +- Add the variable `JAVA_HOME` if it doesn’t exist, and modify is if it + already does: + +![](../img/modify_java_home.png) + +### PATH + +The environment variable `PATH` in **R** is used to indicate to **R** +where to find the executable files. + +When you install a new software (for example JDemetra+, Rtools, Java…) +that Rstudio uses, you have to modify this environment variable: + +- **Get** the actual value of the variable `PATH` via the **R** command + `Sys.getenv("PATH")` (Rstudio returns a succession of addresses as + `C:/WINDOWS/system32;C:/WINDOWS`) + +- **Copy paste** this value after `PATH =` and add the paths towards the + folder ${\textsf{\color{#006817}{\\\\bin\\\\}}}$ (binary) of the + software newly installed, by separating them with semicolon (without + space before or after). For the Rtools installation, the path is + ${\textsf{\color{#006817}{C:\\\\rtools42\\\\mingw64\\\\bin}}}$ + (depending on where Rtools was installed). You have to add + `C:\\rtools42\\mingw64\\bin` or `C:/rtools42/mingw64/bin` (In **R**, + `\` is a special character, so you have to replace the `\` by `/` or + by `\\`). The path becomes + `C:/WINDOWS/system32;C:/WINDOWS;C:/rtools42/mingw64/bin`. + +- **Modify** the variable with the function `Sys.setenv()`. For Rtools, + the command to launch is: + + ``` r + Sys.setenv(PATH = "C:/WINDOWS/system32;C:/WINDOWS;C:/rtools42/mingw64/bin") + ``` + +ℹ️ NB: Generally a 32 bits version and a 64 bits version are available +for downloading and installing a software. You need to check your +processor type of your operating system to choose the right folder to +download. + +For this, you can launch the command: + +``` r +Sys.getenv("R_ARCH") +Sys.info()[["machine"]] +``` + +According to the result, the version is 32 bits or 64 bits : + +| Version | Output | +|---------|--------| +| 64 bits | /x64 | +| | x86-64 | +| | | +| 32 bits | /i386 | +| | x86_32 | + +More information on the variable `PATH` via the page +. + +# Verifications + +To ensure that everything works fine, you can launch some example of +**R** code and check that there is no error: + +``` r +library("RJDemetra") + +myseries <- ipi_c_eu[, "FR"] +x13_model <- x13(myseries) # X-13ARIMA method +ts_model <- tramoseats(myseries) # TRAMO-SEATS method + +# Basic plot with the original series, the trend and the SA series +plot(x13_model, type_chart = "sa-trend") +``` + +To check the Java version we are using on **R**, you can try to install +and use the package **rJava** and launch the command below: + +``` r +# If rJava is not installed +install.packages("rJava") +``` + +If the installation of **rJava** returns an error, it means that Java +was incorrectly installed or incorrectly configured on **R**. You need +to get back to the section [Environment variables](#var_env). + +This block of code tests the Java version with which **R** works: + +``` r +library("rJava") +.jinit() +.jcall("java/lang/System", "S", "getProperty", "java.runtime.version") +``` + +Finally, you can consult the Java version installed with which Windows +works (it doesn’t matter to us): + +``` r +system("java -version") +``` + +# Optional installations + +Some supplementary installations are optional (that is they are no +mandatory but bring external features): + +- [Miktek](https://miktex.org/howto/install-miktex) to produce PDF + document with Latex +- [Rtools](https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html) + to develop **R** packages and compile the code + +# Problems you may encounter + +## Problems installing **R** packages + +If you get the following error while installing **R** packages: + +``` r +install.packages("RJDemetra") +``` + + ## Error in eval(expr, envir, enclos): Erreur: the chargement a échoué + ## Exécution arrêtée + ## *** arch - x64 + +The problem doesn’t come from Java but from the **R** package. By +default, the package is installed from a “source” file, it means that +the package is recompiled. For some computing reasons, when compiling by +default, **R** uses the system (Windows) parameters (which doesn’t have +necessarily have the correct Java version). + +There are two solutions: + +- Compile the package by installing from the binary file: + + ``` r + install.packages("RJDemetra", type = "binary") + ``` + +- Specify that we want to use the local parameters: + + ``` r + install.packages("RJDemetra", type = "source", INSTALL_opts = "--no-multiarch") + ``` + +ℹ️ More information: + + +## The command `library("RJDemetra")` returns an error message + +The package \*\*{RJDemetra requires Java +version 8 or higher to work. If another package has been loaded before +**{RJDemetra}** via the function +`library()` and which doesn’t requires an updated Java version, then an +old Java version will be used during all the session (**R** is +refractory to in-session version change). In case of using +**{RJDemetra}** in a program, you have to +specify at the very beginning of the program that **R** must use Java +version 8, via the command: + +``` r +# Where Java is installed +Sys.setenv(JAVA_HOME = "C:/Users/Software/Java17/jdk17") +``` + +or load **{RJDemetra}** first + +``` r +# At the beginning of program +library("RJDemetra") +``` + +Else you have to restart a new **R** session. + +## `Error array index = -1` + +The message of the type `Error array index = -1` tells that an auxiliary +variable is not found. It can be calendar regressor or other user +defined variables (Easter effect, PSO = pure seasonal outlier…). + +## The function `cruncher_and_param(...)` of the **{JDCruncheR}** package returns an error + +When you use the function `cruncher_and_param(...)` of the +**{JDCruncheR}** package, you can get the +following error: + + ## Error in eval(expr, envir, enclos): Error in cruncher(workspace = workspace, cruncher_bin_directory = cruncher_bin_directory, : + ## There is an error in the path to the cruncher bin folder + +That means that the path to the cruncher is incorrectly configured. To +solve this, you need to specify to R the path to the cruncher at the +start of the program withe the function `options(...)` : + +``` r +options(cruncher_bin_directory = "C:/Users/Software/jwsacruncher-2.2.4-bin/bin") +``` + +To check that the path is valid, you could use the function +`getOption(...)` : + +``` r +getOption("cruncher_bin_directory") +```