You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "``julia_eval`` Evaluate string commands in julia and get the result."
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(JuliaCall)
```
#### Description
``julia_eval`` evaluates string commands in julia and returns the result (automatically converted to an R object or a JuliaObject wrapper). If you don’t need the result, maybe you could try julia_command.
#### Usage
<pre><code>
julia_eval(cmd, need_return = c("R", "Julia"))
</code></pre>
#### Arguments
* ``cmd``: the command string you want to evaluate in julia.
* ``need_return``: whether you want julia to return value as an R object or a wrapper for julia object.
#### Examples
```{r}
## julia_setup is quite time consuming
julia_eval("sqrt(2)")
```
#### Value
the R object automatically converted from julia object.