https://github.com/scijava/scripting-renjin
Wrapper to expose Renjin in the SciJava scripting framework
https://github.com/scijava/scripting-renjin
Last synced: 3 months ago
JSON representation
Wrapper to expose Renjin in the SciJava scripting framework
- Host: GitHub
- URL: https://github.com/scijava/scripting-renjin
- Owner: scijava
- License: gpl-2.0
- Created: 2014-03-05T00:40:25.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T02:28:58.000Z (almost 3 years ago)
- Last Synced: 2025-04-09T11:48:48.487Z (9 months ago)
- Language: Java
- Homepage: http://www.renjin.org/
- Size: 82 KB
- Stars: 5
- Watchers: 23
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://github.com/scijava/scripting-renjin/actions/workflows/build-main.yml)
# Renjin Scripting
This library provides a scripting plugin wrapping the [Renjin](http://www.renjin.org/)
Java implementation of the [R](http://www.r-project.org/) language.
It is implemented as a `ScriptLanguage` plugin for the [SciJava
Common](https://github.com/scijava/scijava-common) platform, which means that
in addition to being usable directly as a `javax.script.ScriptEngineFactory`,
it also provides some functionality on top, such as the ability to generate
lines of script code based on SciJava events.
For a complete list of scripting languages available as part of the SciJava
platform, see the
[Scripting](https://github.com/scijava/scijava-common/wiki/Scripting) page on
the SciJava Common wiki.
-----
Here is an example annotated R script:
```R
# @ScriptService ss
# @OUTPUT String name
language <- ss$getLanguageByName('R')
name <- language$languageName
```
Known limitations or quirks:
* Variables outside the Global environment scope may not persist after the script runs. If you need to access a variable after running the script, it is safer to use global assignment ("<<-" or "assign()");
* "Bean" properties can be accessed via both the getter (`obj$getName()`) or as property (`obj$name`)
* Methods of Java objects must be referrenced via the dollar functions (obj$function)