Learn R Programming

JuliaConnectoR (version 1.1.4)

juliaCall: Call a Julia function by name

Description

Call a Julia function via specifying the name as string and get the translated result. It is also possible to use a dot at the end of the function name for applying the function in a vectorized manner via "broadcasting" in Julia.

Usage

juliaCall(...)

Value

The value returned from Julia, translated to an R data structure. If Julia returns nothing, an invisible NULL is returned.

Arguments

...

the name of the Julia function as first argument, followed by the parameters handed to the function. All arguments to the Julia function are translated to Julia data structures.

Examples

Run this code
if (juliaSetupOk()) {

   juliaCall("/", 4, 2)
   juliaCall("Base.div", 4, 2)
   juliaCall("sin.", c(1,2,3))
   juliaCall("Base.cos.", c(1,2,3))

}
# \dontshow{
JuliaConnectoR:::stopJulia()
# }

Run the code above in your browser using DataLab