pyfun: Call python function

Description Usage Arguments Examples

View source: R/py.R

Description

Call python function

Usage

1
  pyfun(fun_name, argv, module = "__main__")

Arguments

fun_name

the name of function object in python

argv

A character vector which will be converted to list of string in python and send to the called function

module

the module where the function exists

Examples

1
2
3
library(Rython)
py("def test_fun(src):\n    print src\n    return src\n") # define test_fun in python
pyfun("test_fun", letters)

wush978/Rython documentation built on May 4, 2019, 12:02 p.m.