Live data from Hacker News

D for Data Science: Calling R from D

dlang.org

21–23 of 23 posts

Re: D for Data Science: Calling R from D

#21
post #14

Earlier quoted context omitted.

It's really nice to call ggplot2 from Haskell with inline-r quasiquotation, which is evaluated using an instance of the R interpreter embedded in the binary https://tweag.github.io/HaskellR/

D has a similar ggplot package: https://code.dlang.org/packages/ggplotd

well, somewhat similar unless you consider the difference between a native port of a library vs shipping actual ggplot commands over to a real instance of R, which is what inline-r does (with some tradeoffs due to that, of course)

Re: D for Data Science: Calling R from D

#22
post #15

Earlier quoted context omitted.

We’d love to call R from php or python. Incredibly good stats. We use the Rscript (To run r from command line) to generate graphs for the webs but to call directly would be nice. We tried extracting some of the phyper code into a stand alone application, but not trivial.

Rpy2 should work, no? And reticulate is really great for calling python from R https://rstudio.github.io/reticulate/index.html

I'll check it out. Thanks.

Re: D for Data Science: Calling R from D

#23
post #15

Earlier quoted context omitted.

We’d love to call R from php or python. Incredibly good stats. We use the Rscript (To run r from command line) to generate graphs for the webs but to call directly would be nice. We tried extracting some of the phyper code into a stand alone application, but not trivial.

Rpy2 should work, no? And reticulate is really great for calling python from R https://rstudio.github.io/reticulate/index.html

Yes. Reticulate is great for R to Python.

In case you need data handoffs between various processes, you might want to use an intermediate transition via a database, flat file, etc. It helped me get over few problems of passing data around.

Post reply on HN