-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcall.Rmd
More file actions
39 lines (29 loc) · 1.19 KB
/
call.Rmd
File metadata and controls
39 lines (29 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
title: "call Call julia functions."
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(JuliaCall)
```
#### Description
julia_do.call is the do.call for julia. And julia_call calls julia functions.
#### Usage
<pre><code>
julia_do.call(func_name, arg_list, need_return = c("R", "Julia", "None"),vshow_value = FALSE)
julia_call(func_name, ..., need_return = c("R", "Julia", "None"),vshow_value = FALSE)
</code></pre>
#### Arguments
* func_name the name of julia function you want to call.
* arg_list the list of the arguments you want to pass to the julia function.
* need_return whether you want julia to return value as an R object, a wrapper for julia object or no return. The value of need_return could be TRUE (equal to option "R") or FALSE (equal to option "None"), or one of the options "R", "Julia" and "None".
* show_value whether to display julia return value or not.
* ... the arguments you want to pass to the julia function.
#### Details
Note that named arguments will be discarded if the call uses dot notation, for example, "sqrt.".
#### Examples
```{r}
## julia_setup is quite time consuming
julia_do.call("sqrt", list(2))
julia_call("sqrt", 2)
```