Skip to content

yixuan/Rmath-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rmath-Java

Rmath-Java is a Java wrapper of the Rmath library from R, which contains functions related to statistical distributions.

Dependency

This library uses JNA to call native code in Rmath. See the next section for download link of JNA.

Getting Rmath-Java

Download

  • JNA (4.2.0)
  • Rmath-Java for Windows and 64-bit Linux. For other systems and architectures, the jar file can be built from source.

Build from source

To build Rmath-Java from source, one needs:

  • GCC/Clang compiler
  • JDK
  • make

Then simply enter the source directory and type make.

Examples

For Java,

import statr.rmath.Rmath;

public class TestRmath {
    public static void main(String[] args) {
        System.out.println("dnorm(1.2, mu = 3.4, sd = 5.6) = " +
                           Rmath.dnorm(1.2, 3.4, 5.6));
    }
}

or in Scala,

import statr.rmath.Rmath

Rmath.dnorm(1.2, 3.4, 5.6)

License

Rmath-Java includes code from the R project which is licensed under GPL (>= 2). Rmath-Java itself is also licensed under GPL (>= 2).

About

Java wrapper of Rmath library for statistical distribution functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages