Installation of FastRet consists of the following two steps, which are explained in detail in the following sections.
- Install Java Development Kit (JDK) version 11 or higher
- Use
install.packages("FastRet")to install the released version of FastRet from CRAN (orpak::pkg_install("spang-lab/FastRet")to install the development version from GitHub)
If you only want to try FastRet, you can also use the hosted version of the GUI at https://fastret.spang-lab.de, which requires no installation at all.
Install Java Development Kit (JDK)
FastRet uses the rJava package, which itself requires
the Java Development Kit (JDK) version 11 or higher. You can test
whether you have a sufficiently high version of JDK already installed on
your system by entering the following command in your terminal.
If you do not have a suitable JDK installed, you can download and install it from various vendors such as the Adoptium Working Group or Azul. For a list of vendors providing JDKs, see whichjdk.com.
When installing a JDK, there are a few things to look out for, e.g.:
- Windows users should activate the update of “JavaSoft registry keys”
during the installation process. This is necessary for the
rJavapackage to find the SDK installation. Depending on the SDK vendor you choose, the option might be named differently. - macOS users must use at least R-4.1.2.
- Linux users should run
R CMD javareconfafter installing the JDK to make sure that R can find the JDK.
Install FastRet
To install the released version of FastRet from CRAN, enter the following command in an R session:
install.packages("FastRet")To install the development version of FastRet from the GitHub repository
instead, first install the R package manager pak from CRAN
and then use it to install FastRet:
install.packages("pak")
pak::pkg_install("spang-lab/FastRet")Troubleshooting
JAVA_HOME cannot be determined from the Registry
The error message
JAVA_HOME cannot be determined from the Registry indicates
that the rJava package cannot find the JDK installation.
This can cause further errors such as
ERROR: lazy loading failed for package 'FastRet' when
trying to load FastRet. See rJava
installation fails for possible solutions.
rJava installation fails
If the installation of the rJava package fails:
- Make sure you have a suitable JDK installed on your system, as described in Install Java Development Kit (JDK).
- Reinstall the
rJavapackage by entering the following command in an R session:install.packages("rJava"). - Run
library("rJava")to ensure that the package can be loaded.
If this doesn’t solve your problem, have a look at the Troubleshooting Guide of the rJava package.
