I have function in python as following :
def print_hello():
print("hello")
Rather than writing to python file and reading it from file using source_python
. I would like just pass function as string and convert into R.
similar to following things
library(reticulate)
myPythonFunction <- "def print_hello():
print("hello")
"
source_from_string(myPythonFunction)
print_hello()
Does reticulate package has this function ??