Seamless Integration Between R and 'Julia'

Provides an R interface to 'Julia', which is a high-level, high-performance dynamic programming language for numerical computing, see <> for more information. It provides a high-level interface as well as a low-level interface. Using the high level interface, you could call any 'Julia' function just like any R function with automatic type conversion. Using the low level interface, you could deal with C-level SEXP directly while enjoying the convenience of using a high-level programming language like 'Julia'.

Travis-CI Build Status AppVeyor Build Status CRAN_Status_Badge

Table of Contents

Package JuliaCall is an R interface to 'Julia', which is a high-level, high-performance dynamic programming language for numerical computing, see for more information. Below is an image for Mandelbrot set. JuliaCall brings more than 100 times speedup of the calculation! See for more information.


JuliaCall is on CRAN now! To use package JuliaCall, you first have to install Julia on your computer, and then you can install JuliaCall just like any other R packages by


You can get the development version of JuliaCall by


Basic Usage

julia <- julia_setup()
#> Julia at location /Applications/ will be used.
#> Julia version 0.6.1 found.
#> Julia initiation...
#> Finish Julia initiation.
#> Loading setup script for JuliaCall...
#> Finish loading setup script for JuliaCall.
## Different ways for using Julia to calculate sqrt(2)
# julia$command("a = sqrt(2);"); julia$eval("a")
julia_command("a = sqrt(2);"); julia_eval("a")
#> [1] 1.414214
#> [1] 1.414214
julia_call("sqrt", 2)
#> [1] 1.414214
#> [1] 1.414214
julia_assign("x", sqrt(2)); julia_eval("x")
#> [1] 1.414214
julia_assign("rsqrt", sqrt); julia_call("rsqrt", 2)
#> [1] 1.414214
2 %>J% sqrt
#> [1] 1.414214
## You can use `julia$exists` as `exists` in R to test
## whether a function or name exists in Julia or not
#> [1] TRUE
#> [1] FALSE
## You can use `julia$help` to get help for Julia functions
#> ```
#> sqrt(x)
#> ```
#> Return $\sqrt{x}$. Throws [`DomainError`](@ref) for negative [`Real`](@ref) arguments. Use complex negative arguments instead. The prefix operator `√` is equivalent to `sqrt`.
## Functions related to installing and using Julia packages
#> [1] "0.10.1"

How to Get Help?

  • One way to get help for julia functions is just using julia$help like the following example:
#> ```
#> sqrt(x)
#> ```
#> Return $\sqrt{x}$. Throws [`DomainError`](@ref) for negative [`Real`](@ref) arguments. Use complex negative arguments instead. The prefix operator `√` is equivalent to `sqrt`.

JuliaCall for R Package Developers

If you are interested in developing an R package which is an interface for a Julia package, JuliaCall is an ideal choice for that!

Basically you only need to find the Julia function or Julia module you want to have in R and then just using the module and call the function. An example is ipoptjlr, which can be found at

If you have any issues in developing an R package using JuliaCall, you may report it using the link: Or email me at [email protected] or [email protected].

Suggestion and Issue Reporting

JuliaCall is under active development now. Any suggestion or issue reporting is welcome! You may report it using the link: Or email me at [email protected] or [email protected].

And if you encounter some issues which crash R or RStudio, then you may have met segfault errors. I am very sorry. And I am trying my best to remove errors like that. It will be much appreciated if you can

  • download the source of JuliaCall from Github,
  • open JuliaCall.Rproj in your RStudio or open R from the directory where you download the source of JuliaCall,
  • run devtools::check() to see the result of R CMD check for JuliaCall on your machine,
  • and paste the result to the issue report.


JuliaCall 0.7.3

  • First release on CRAN.
  • julia_setup for initial setup of JuliaCall.
  • julia_eval_string, julia_command for executing commands in julia.
  • and julia_call for calling functions in julia.
  • Functions to deal with julia packages.
  • Helper functions like julia_help.


  • Added a file to track changes to the package.
  • Add helpful error messages in libjulia DLL load and compilation.
  • Add julia_assign which can assign a value to a name in julia with automatic type conversion.
  • Give the option to set path for julia.
  • Deprecate julia_check.
  • julia_console. Now there is a fully functional julia repl in R terminal, and a usable julia console when you use IDE for R.
  • In julia_setup, there is an option whether or not to use RCall.jl, RCall's R REPL mode and rgui will be set correctly.


  • Have a basic julia display system, now the plot functionality in Julia works (mostly).
  • JuliaCall is more consistent with julia.


  • julia.do_call and julia_call now accept keyword arguments.
  • JuliaCall works in Jupyter R notebook.
  • JuliaCall works in R Markdown. The display system currently only work for html document. When there is no return from julia function and there is a need to display, a div with class=‘JuliaDisplay’ will be inserted into the html document with the corresponding content.
  • Julia engine in R Markdown through JuliaCall.


  • Try to convert julia tuple.
  • Add JuliaObject, which serves as a proxy in R for julia object, which is the automatic conversion target when other choices are not possible.
  • julia_setup() doesn't need to be called first unless you want to force julia to restart or you need to set the julia path.


  • Improve JuliaObject, same Julia object could enter julia_object_dict only once. And the display of JuliaObject becomes better. Also every common types of Julia Object could be wrapped by JuliaObject.
  • The users could now choose to have JuliaObject type return value instead of R Object.
  • Dot notation in julia is now accepted through the julia_call interface.
  • julia_eval_string is deprecated in favor of julia_eval.


  • New Julia display system plotsViewer(), which integrates better into R.
  • Fits several bugs in JuliaCall, like removing using of depreated function.
  • Improve display systems of RMarkdown and Jupyter R Notebook.

JuliaCall 0.9.3

  • Second release on CRAN.


  • Performance improvements for dot notation function call.


  • Implementation of JuliaArray.


  • Bug fix in JuliaArray.
  • Do not convert Tuple any more.


  • Important bug fix in JuliaObject, for more detail, see github issue #15, issue #12 and #13 are related.


  • Dispatching for JuliaObject and JuliaArray.


  • Do not use JuliaArray, the discussion is in #16.
  • JuliaObject is an S4 class now, which should be more robust.


  • Implement generics for JuliaObject, and fix many small bugs.
  • Fix the bug of the conversion of AbstractArray{Any}.
  • Julia tuple converts to R S3 class of JuliaTuple based on list.
  • Add fields, field and field<- function for JuliaObjects.


  • Use R6 for the implementation of JuliaObject. It's lightweight, faster, and safer.


  • Remove deprecated julia_eval_string.
  • Improve JuliaCall RMarkdown engine. The display system should work for all kinds of documents that rmarkdown supports.
  • Should use older version of RCall with older version of R.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.12.1 by Changcheng Li, 23 days ago

Report a bug at

Browse source code at

Authors: Changcheng Li [aut, cre], Randy Lai [ctb], Dmitri Grominski [ctb], Nagi Teramo [ctb]

Documentation:   PDF Manual  

Task views: Numerical Mathematics

MIT + file LICENSE license

Imports utils, R6, Rcpp

Suggests testthat, knitr, rmarkdown

Linking to Rcpp

System requirements: Julia >= 0.6.0, RCall.jl

Imported by convexjlr.

Suggested by knitr.

See at CRAN