Re:How The Rise Of The "R" Computer Language Is Bringing Ope...
by jareds on Thursday April 03, 2014 @04:35PM
(#7526378)
What advantages does Python have over R for basic statistics work? I’m trying to play with data for fantasy sports and was planning on getting the data into a MySQL database then using R to look for patterns. Is R the right choice for this, or is it a matter of both Python and R being able to the same thing in different ways so there is no wrong choice? Given the fact that it will be a fairly small dataset I’m not overly worried about performance.
[ Parent
| on HN ]
Re:How The Rise Of The "R" Computer Language Is Bringing Ope...
by keypusher on Friday April 04, 2014 @02:16AM
(#7529627)
One of the big differences is that Python is a general purpose programming language, which just happens to have great support for statistics through packages. That means interfacing with a database is a very common workflow, and there are solid tools to do so like sqlalchemy. Now let's say you you want to calculate all this data and serve it on a webpage. R kind of falls over at this point. Python? No problem, you can start up a Flask webserver in half a dozen lines of code and have your data visible to all your fantasy team friends. Oh, you want to pull down the live data from the web, parse it from html/xml/csv, analyze it, put it into the database, and spit out the new analysis in realtime on your webpage? Python has you covered. R, not so much. To me Python also feels much more robust and well thought out as a language, but that could just be personal prejudice.
Re:How The Rise Of The "R" Computer Language Is Bringing Ope...
by sampo on Friday April 04, 2014 @02:46PM
(#7533458)
> "What advantages does Python have over R for basic statistics work?"
The advantage of Python is that it's a nice, well designed general purpose programming language. But in basic statistics work you don't need to develop large, well organized programs, so in practice I'd say there is no advantage.
R provides a larger collection of all kind of statistical routines out of the box.
Re:How The Rise Of The "R" Computer Language Is Bringing Ope...
by dlib on Thursday April 03, 2014 @04:46PM
(#7526488)
No wrong choice I think, mostly personal preference. If you know Python I'd stick with that, iPython notebooks with pandas etc. is a solid choice.
R might be a little harder to start with, sapply/lapply can be confusing but there's plenty of info and libraries on the web to make your life easier. For plotting, ggplot still wins over matplotlib in my opinion but Python has other strengths.