Re:Ask HN: Python or R?
by svjunkie on Tuesday November 19, 2013 @11:04AM
(#6762050)
What's the problem you're trying to solve? It's hard for anyone to give useful advice without any more context.
That said, I recommend whichever language is easiest for you. I use R and have not fully learned Python, so I have an obvious bias. If you're performing complicated statistical analysis, I'd recommend R, but for more traditional programming, I get the impression that Python interfaces more efficiently with other languages.
Re:Ask HN: Python or R?
by stadeschuldt on Tuesday November 19, 2013 @11:35AM
(#6762292)
I use both. I like R for its charting capability and the sheer amount of packages for different use cases. I use Python to pre-process data and get it into because it is a lot easier than in R. Also Scikit-learn, NumPy and Pandas are really nice.
Re:Ask HN: Python or R?
by xixi77 on Tuesday November 19, 2013 @02:08PM
(#6763549)
As everyone says, depends on what you are trying to do.
For all interactive/exploratory analysis, for statistical graphics, for more advanced statistics, for most statistics-related research work in general, I would definitely pick R out of these two.
If statistics is only a small part of the application, if you already know exactly what you have to do (i.e. no data exploration), if you have to do a lot of web/text processing -- probably Python.
Also, check which one has more/better packages related to what you are doing.
For some stats projects I would go with something else entirely though.
Re:Ask HN: Python or R?
by xixi77 on Tuesday November 19, 2013 @02:16PM
(#6763628)
I'm not sure that's the distinction -- there is no shortage of general-purpose programming code written in R, as well as statistics done in Python.
It's more about use cases -- is it all about statistics, or is actual statistics only a small part? Is the focus primarily on research and exploration, or on implementation and deployment?
Re:Ask HN: Python or R?
by floppydisk on Tuesday November 19, 2013 @12:41PM
(#6762828)
It really all boils down to what problem you're trying to solve, what kind of analysis you're trying to do, and what the performance requirements are. For basic stats, R and Python will be comparable in terms of library availability and functionality. If you start getting into more specialized and/or esoteric statistics, you will find more R packages (libraries) than you will Python libraries.
Re:Ask HN: Python or R?
by bjoerns on Tuesday November 19, 2013 @10:33AM
(#6761793)
I use both for my data analysis (though I'm not doing anything too fancy these days). R is great at statistics (that's what it was designed for) but a bit of a terrible programming language. So I combine the two, do all the IO stuff etc in Python and run the actual statistical analysis in R (RPy is a great Python interface to R).
Re:Ask HN: Python or R?
by bjoerns on Tuesday November 19, 2013 @10:49AM
(#6761917)
...although even at the risk of getting laughed at, Excel is an awesome tool for a lot of quick and dirty data analysis stuff (depending on what you do). Throw in a little Python/R (e.g. via datanitro) and it's even more powerful.
I read this [blog] earlier and as a result I don't think I'll bother to learn R unless I have to.
[pandas]: http://pandas.pydata.org/
[statsmodels]: http://statsmodels.sourceforge.net/
[blog]: http://www.talyarkoni.org/blog/2013/11/18/the-homogenization...
That said, I recommend whichever language is easiest for you. I use R and have not fully learned Python, so I have an obvious bias. If you're performing complicated statistical analysis, I'd recommend R, but for more traditional programming, I get the impression that Python interfaces more efficiently with other languages.
For all interactive/exploratory analysis, for statistical graphics, for more advanced statistics, for most statistics-related research work in general, I would definitely pick R out of these two.
If statistics is only a small part of the application, if you already know exactly what you have to do (i.e. no data exploration), if you have to do a lot of web/text processing -- probably Python.
Also, check which one has more/better packages related to what you are doing.
For some stats projects I would go with something else entirely though.
You could compare R to Matlab, or R to python library with similar scope (numpy or pandas).
It's more about use cases -- is it all about statistics, or is actual statistics only a small part? Is the focus primarily on research and exploration, or on implementation and deployment?