- GraalVM Updater
- Native Image
- Polyglot Reference
- Embedding Reference
- Truffle Language Implementation Framework
- JVM Languages Reference
- LLVM Languages Reference
- Python Reference
- R Reference Manual
- GraalVM R Engine Compatibility
- R Extensions Support
- Interoperability with Java
- Parallel Execution
- GraalVM R Engine Performance
- Ruby Reference
- WebAssembly Reference
GraalVM R Engine Compatibility
GraalVM implementation of R, known as FastR, is based on GNU R and reuses
the base packages. It is currently based on GNU-R 3.6.1, and moves to new major
versions of R as they become available and stable. The FastR project, maintains an extensive set of unit
tests for all aspects of the R language and the builtin functionality, and these
tests are available as part of the R source code. GraalVM R engine aims to be
fully compatible with GNU R, including its native interface as used by R extensions. It
can install and run unmodified complex R packages like
Rcpp. As some packages rely on unspecified behaviour or implementation details
of GNU-R, support for packages is work in progress, and some packages might not
install successfully or work as expected.
Packages can be installed using the
install.packages function or the
R CMD INSTALL shell command.
By default, R uses fixed snapshot of the CRAN repository1.
This behavior can be overridden by explicitly setting the
repos argument of the
This functionality does not interfere with the
checkpoint package. If you are behind a proxy server, make
sure to configure the proxy either with environment variables or using the JVM options,
Versions of some packages specifically patched for GraalVM implementation of R can be installed using the
function that downloads them from the GitHub repository.
Currently, those are
Known limitations of GraalVM implementation of R compared to GNU R:
- Only small parts of the low-level
graphicspackage are functional. However, the
gridpackage is supported and R can install and run packages based on it like
ggplot2. Support for the
graphicspackage in R is planned for future releases.
- Encoding of character vectors. Related builtins (e.g.,
Encoding) are available, but do not execute any useful code. Character vectors are represented as Java Strings and therefore encoded in UTF-16 format. GraalVM implementation of R will add support for encoding in future releases.
- Some parts of the native API (e.g.,
DATAPTR) expose implementation details that are hard to emulate for alternative implementations of R. These are implemented as needed while testing the GraalVM implementation of R with various CRAN packages.
You can use the Compatibility checker to find whether the CRAN packages you are interested in are tested on GraalVM and whether the tests pass successfully.
1 More technically, GraalVM implementation of R uses a fixed MRAN URL from
$R_HOME/etc/DEFAULT_CRAN_MIRROR, which is a snapshot of the
CRAN repository as it was visible at a given date from the URL string.