R vs Python for Stats
The cluster centers on comparisons between R and Python for statistical analysis, data science, and related tasks, with many comments emphasizing R's superior ecosystem, packages, and suitability for statistics over Python's offerings like Pandas.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Could you give a couple of examples, where R is substantially superior to Python?
R has much much better statistical packages that R, if it is statistics, you can probably find a package in R to do it, not same with python. And the programming language is much better for statistics than numpy/pandas if a package is not sufficient. I use both, and for statistics have no choice but to use R. For data, I use python.
I`d use R instead. Python is best used as a glue language to access premade libraries.
Should one learn R if one already has some experience in data analysis with Python?
I use Python and R for data science, and I've never had any issue with R. In fact, I find that many tasks are much simpler in R than in Python.
It depends. R has many, many more packages and those packages tend to be more extensively peer-reviewed. If the sort of analysis you are doing wanders out of the mainstream, you are less likely having to code something up from scratch than is the case with python/*. I also find R is a lot more enjoyable to use interactively and for exploring data than python. On the other hand, python is fantastic for larger pieces of code, data wrangling, and any tasks where you can make use of python'
R is not such a terrible language, though it is quirky. Unfortunately, yes, you are kind of handicapping yourself. The libraries behind R are, for statistical purposes, infinitely better than Python.
What can R do that Python can't right now?
As other said, R is the way to go if you decide to work solely with statistics. My opinion towards R is that it needs some improvements, sometimes it feels like a language made for prototyping only. But that is maybe its goal, so in the end it could be a good thing to match academic needs.
I can't speak for top comment but I started learning R and realized that a lot of the primitives which are exposed in python as libraries are just primitives in R and are thus are more natural to use in subtle ways. Once you start thinking in R you think in data and statistics rather than how you deal with data and statistics within a language. This doesn't mean one is actually better than the other unless you want to do generic programing things along your math oriented code then prob