Learn R Programming

JuliaConnectoR (version 1.1.4)

juliaEval: Evaluate a Julia expression

Description

This function evaluates Julia code, given as a string, in Julia, and translates the result back to R.

Usage

juliaEval(expr)

Value

The value returned from Julia, translated to an R data structure. If Julia returns nothing, an invisible NULL is returned. This is also the case if the last non-whitespace character of expr

is a semicolon.

Arguments

expr

Julia code, given as a one-element character vector

Details

If the code needs to use R variables, consider using juliaLet instead.

Examples

Run this code
if (juliaSetupOk()) {
   juliaEval("1 + 2")
   juliaEval('using Random; Random.seed!(5);')

if (FALSE) {
   juliaEval('using Pkg; Pkg.add("BoltzmannMachines")')
}
}
# \dontshow{
stopJulia()
# }

Run the code above in your browser using DataLab