JuliaCall (version 0.16.6)

julia_command: Evaluate string commands in julia and (may) invoke the julia display system.

Description

julia_command evaluates string commands in julia without returning the result back to R. However, it may evoke julia display system, see the documentation of the argument `show_value` for more details. If you need to get the evaluation result in R, you can use julia_eval.

Usage

julia_command(cmd, show_value = !endsWith(trimws(cmd, "right"), ";"))

Arguments

cmd

the command string you want to evaluate in julia.

show_value

whether to display julia returning value or not, the default value is `FALSE` if the `cmd` ends with semicolon and `TRUE` otherwise.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
 ## julia_setup is quite time consuming
  julia_command("a = sqrt(2);")
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace