juliaEval {JuliaConnectoR}R Documentation

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)

Arguments

expr

Julia code, given as a one-element character vector

Details

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

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.

Examples

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

## Not run: 
   juliaEval('using Pkg; Pkg.add("BoltzmannMachines")')

## End(Not run)
}


[Package JuliaConnectoR version 1.1.3 Index]