Hacker News new | past | comments | ask | show | jobs | submit login

However, to me R appears like a little better Swiss Army Knife to do initial analysis. ggplot2, tidyverse, ...

R is far superior for interactive exploration/analysis and report writing. However Python is far superior if you are writing a program that does other things too.

My rule of thumb is that if a Python program is 70% or more Numpy/Pandas/Matplotlib etc then it should be R. Whereas an R program does comparatively little analysis and a lot of logic and integration, it should be Python. No one size fits all.




Can you "import R" in python? Sounds like that would be best.


Call Python from R: https://cran.r-project.org/web/packages/reticulate/vignettes...

Calling R from Python: https://pypi.org/project/rpy2/

I'm not sure I'd ever mix the two directly myself; I'd compose my application as separate R and Python communicating somehow. It seems cleaner.


Haha, what you said made me think: sagemath!

And sure enough it has something to tie in R too, truly connecting everything in a big nest: https://doc.sagemath.org/html/en/reference/interfaces/sage/i...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: