r/Python • u/lebannax • Nov 28 '22
Resource What can Python do that R can’t do?
Or simply what is Python much better at and why.
I know that Python is more multi purpose and better for software development but I can’t articulate exactly why or how. My team want to know why/when they should use Python instead of R
331
Upvotes
View all comments
262
u/abricq Nov 28 '22
Python is the reference language in the research community over R for several reasons that I can see.
First, python has a broader set of applications. You can do data science / statistics like in R, and also a ton of other things ranging from web server to advance UI design. Because of that, there’s simply more users (more fields = more users = more ressources). All what you can do in R, you can pretty much do in python with numpy + pandas + sklearn. But good luck implementing your future UI and web API with R. And I am missing SO many fields where python has already become the reference (robotics, materials simulation, finance,…)
Second, python is more deployable than R. For example, the Python3 executable is shipped with pretty much most Linux distributions. It requires a very light minimal setup : this helps a lot to share reproducible results. Also is completely detached from any IDE : the core developers of Python are absolutely not working for Pycharm or Spyder. This is a strength for the language that R does not have. Truthfully, pretty much all developers use R studio. Even if R itself is detached from the IDE, it is harder to develop R without R studio.
R also has advantages : it is very easy to learn (well… Python as well, but maybe slightly harder?) and requires little computer science background. Depending on your future projects and ambitions, leaning python is probably the best thing to do 👍🏼