Rulia (github): une vie polyamoureuse entre R et Julia

R(ulia) Drouilhet

https://cqls.dyndoc.fr/Rulia/talk


Introduction

Why I love R and julia?

  • R: (single) dispatching, keyword arguments, simplicity, metaprogramming, unique package manager
  • julia: almost same thing + performance (multiple dispatching, J.I.T. compilation,tree of Types)

Why the package Rulia (julia for R)?

  • an evidence (for me): julia an UNIQUE language combining expressiviness of R and performance of C++
  • Rulia (alternative of JuliaCall) for creation of R package to "wrap" julia package without an dependence to Rcpp and RCall.jl (unlike JuliaCall)

Rulia (julia for R)

Use of Rulia

  1. Workflow
    1. julia function(s) creation
    2. julia function(s) call(s) within R
    3. 2 conversions required:
      • R to julia to fulfill arguments
      • julia to R to use the results within R

Rulia: jl mode more in details

  1. R metaprogramming allows us to offer a format very similar to original julia code
  2. no string to call julia function

Rulia advanced use in Statistics

  1. conversion data.frame (R) and DataFrame (julia)
  2. conversion factor (R) and CategoricalArrays (julia)

Comments

A few words on the dΓ©veloppement of Rulia

  1. class jlvalue as an external pointer
  2. garbage collector of julia called whenever the garbage collector of R is cleaning an R object of class jlvalue
  3. function of class jlfunction
  4. errors managed by R object of class jlexception

Rulia limitations

  1. Rulia is a package still experimental and then not considered as stable
  2. Binary installation only provided forWindows. For other OS, installation needs (at least now) a C compiler (see https://github.com/rcqls/Rulia )