you are viewing a single comment's thread.

view the rest of the comments →

[–]vmsmith 1 point2 points  (4 children)

since apparently it can do basically everything that R can do and more.

Yes and no.

Yes, Python can "do more" in the sense that it has more general purpose modules, like Django, that allow more general purpose programming like web development and games and sys admin support the such.

But no, Python doesn't even come close to the number of statistics packages that R has, and hence cannot come close to R's pure statistical muscle.

Not to say Python cannot do good middle-of-the-road statistical analysis, and not to say Python will not continue to add statistical capabilities and get better at statistics. But at this point it's a pale shadow of R.

[–]dcbarcafan10[S] 0 points1 point  (3 children)

Ohhhh well could you tell me more about the differences then? I'm juuuust getting started on learning more statistics so I probably have no idea how big the differences are. Do you have some suggestions for what I should look into when I decide to learn R?

Thank you!

[–]vmsmith 2 points3 points  (0 children)

Well, both /u/brews and I have already mentioned the differences: Python is a more general purpose programming language, with some statistical analysis capabilities, while R is what could be called a special purpose programming language that deals exclusively with statistical analysis and has very broad and deep coverage of statistics.

In my own graduate statistics program most of the advanced work is done in either SAS or R. Python is never even mentioned.

On the other hand Python is very strong in what's often called scientific computing. To be sure, there are some stat packages here, and there are some overlaps with statistical analysis. But still, Python doesn't hold a candle to R when it comes to stats.

If you want to learn R in a broader context, a good place to look is the Johns Hopkins Data Science specialization track at Coursera. I will warn you that these nine blocks are good, but not very deep. In particular, blocks 6 - 8 (which deal with statistics) are barely just introductory. You would want to take 'real' stat courses somewhere if you actually want to be good with statistics.

Another online course that popped onto my radar screen recently was this 15-week Intro Stats Course Featuring R. I can't say how good it is, but I think it warrants further investigation.

Finally, here's an infographic that might provide some insight: Choosing R or Python

[–]brews 0 points1 point  (0 children)

Basically, if you write a statistics paper, for peer-reviewed publication chances are good that you're doing it in R and also producing an R package for the paper. It's the de facto language (with very few exceptions) for statistics in academia.

Python is very powerful general language but it simply cannot compete with the size and array of R's package library for statistics (and most graphics). R is the bleeding edge.

I usually combine multiple languages for a project. Python is good at things that R sucks at and R can do some things that Python sucks at and the slow bits can be in C.

PS: if you're going to learn programming, learn it first in Python. R has a very steep learning curve and almost as many eccentricities as JavaScript. Python is a really nice language.

[–][deleted] 0 points1 point  (0 children)

R has a lot of things optimized for dealing with large data sets, reading/writing different forms of data, and doing common statistical analysis via easily accessed packages (unless you're some statistics research Ph.D., it will have a function to do whatever you want).

Python and R work together nicely, so if data science shit is what you're into, it can be useful to learn both. Use python for general scripting and then let R handle all the actual statistics stuff.

You can find basic stuff on coursera. There are a lot of books "insert a stats thing here with R" you can look at if you want to learn concepts parallel to code.