←back to thread

Big Book of R

(www.bigbookofr.com)
288 points sebg | 1 comments | | HN request time: 0.201s | source
Show context
kingkongjaffa ◴[] No.43647159[source]
What is the best way to integrate some R code with a python backend?

I’ve been tempted to port to python, but some of the stats libraries have no good counterparts, so, is there a ergonomic way to do this?

replies(5): >>43647179 #>>43647450 #>>43647806 #>>43647807 #>>43648782 #
1. jjr8 ◴[] No.43647806[source]
There is also https://www.rplumber.io/, which lets you turn R functions into REST APIs. Calling R from Python this way will not be as flexible as using rpy2, but it keeps R in its own process, which can be advantageous if you have certain concerns relating to threading or stability. Also, if you're running on Windows, rpy2 is not officially supported and can be hard to get working.