juliaCall: Call a Julia function by name

Description Usage Arguments Value Examples

View source: R/main.R

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

1

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.

Value

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

Examples

1
2
3
4
5
6
7
8
if (juliaSetupOk()) {

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

}

JuliaConnectoR documentation built on Jan. 27, 2022, 1:12 a.m.