RockridgeKid
RockridgeKid

Reputation: 145

Calling my own R routines with Python

I want to call a complex algorithm coded in R from python.

Looking at the RPY2 package documentation I understand that I can call many standard R functions using the robjects package.

I was wondering if this could be extended to my own R routines. Should I package my R stuff or could I use my code as is? Is there a way I could make it accessible?

Thanks for the help.

Upvotes: 0

Views: 167

Answers (1)

lgautier
lgautier

Reputation: 11545

You do not have to make an R package. Rpy2 can evaluate strings as R code. There is also a convenience system to evaluate a string with R code and wrap it as if it was a package.

Upvotes: 1

Related Questions