Galaaz
Galaaz 2.0 drives GNU R from JRuby or
CRuby over the same NewBridge protocol. You write Ruby
(R.c(...), dplyr-style chains, ggplot2) and talk to the same R
you use for CRAN and Bioconductor. It is not the older GraalVM / TruffleRuby
/ FastR stack.
Install
You need JRuby (tested with 10.1.1.0 + JDK 21) or
CRuby (tested with 3.3.12), plus GNU R with
Rscript, a C++ toolchain, and Rcpp
(install.packages("Rcpp")).
CRuby
gem install galaaz
gem_dir="$(ruby -e "puts Gem::Specification.find_by_name('galaaz').full_gem_path")"
make -C "${gem_dir}/ext/new_bridge" all
JRuby
jruby -S gem install galaaz
gem_dir="$(jruby -e "puts Gem::Specification.find_by_name('galaaz').full_gem_path")"
make -C "${gem_dir}/ext/new_bridge" all
Full steps, WSL/Docker notes, and the contributor clone path are in the
manual
and the
README.
The gem is on
RubyGems
(changelog).
From 2.1.4, long CRAN installs and long R work can run via
R::Job so the bridge stays free.
Try (Docker)
Public try images have Ruby, GNU R, and Galaaz already installed and start
gstudio (IRB). Docker only; nothing to gem-install:
JRuby
docker run --rm -it ghcr.io/rbotafogo/galaaz-try:gstudio
CRuby
docker run --rm -it ghcr.io/rbotafogo/galaaz-try:cruby
Then vec = R.c(1, 2, 3); puts vec. From a checkout you can
also build locally with ./docker/try-gstudio/run.sh or
./docker/try-cruby/run.sh. These are demo shells, not the
cold-install proof.
Maintainers can prove a RubyGems install in a throwaway Ubuntu container (no git repo inside):
./docker/cold-install/run.sh published-specs # JRuby ./docker/cold-install-cruby/run.sh published-specs # CRuby
Manual
Blogs
- Oh my… Galaaz · PDF
- gKnit · PDF
- ggplot with Galaaz · PDF
- NSE and dplyr · PDF
- Ruby plot · PDF
Repository
- Source on GitHub (branch
galaaz2_0) - galaaz on RubyGems
- Examples (source)
- Specs
- Example rendered PDFs on this site
Source and runnable examples ship in the gem; knitted HTML/PDF live here.
After install, use gstudio for an interactive shell.