Julia looks very promising for fast and syntax-sane computation (e.g. here), but I suspect it will not be anywhere near R in terms of overall statistics workflow for some time yet. So I'd like to use it where C++ is mainly used in R programs: to optimize slow portions of code. Before I invest the time in learning Julia, though, I am curious what facilities there are for embedding Julia snippets in R code.
So:
- What facilities are out there for linking R and Julia?
- How robust and well-thought-out are they, on a scale of zero to Rcpp?
I want to call Julia from R, just as Rcpp allows calling C++ from within R right now. I do not want to call R from Julia. (So RCall.jl would not work)
I create an R package called
JuliaCall
recently, which embeds Julia in R. The package is on CRAN.https://cran.r-project.org/web/packages/JuliaCall/index.html
https://github.com/Non-Contradiction/JuliaCall
The usage of the package is like this:
As you can see, you could send command strings and call Julia functions really easily.
And there are also some R packages wrapping Julia packages using
JuliaCall
, for example,convexjlr
for Disciplined Convex Programming in R using Convex.jl, which is also on CRAN.ipoptjlr
, an R Interface for Interior Point OPTimizer (IPOPT) using Julia packageIpopt.jl
.Welcome for any feedback on
JuliaCall
!!