【发布时间】:2019-11-24 08:02:35
【问题描述】:
我在 python 中的功能如下:
def print_hello():
print("hello")
而不是写入python文件并使用source_python从文件中读取它。我只想将函数作为字符串传递并转换为 R。
类似下面的东西
library(reticulate)
myPythonFunction <- "def print_hello():
print("hello")
"
source_from_string(myPythonFunction)
print_hello()
网状包有这个功能吗??
【问题讨论】:
标签: python r reticulate