3 ms·
Use both and you'll see. Python can do modeling, can do exploratory work and is great in production. R is brilliant at exploratory work and modeling. Having a c
by billwilliams 14y ago
Use both and you'll see. Python can do modeling, can do exploratory work and is great in production. R is brilliant at exploratory work and modeling. Having a core in functional programming helps too.
- tocomment 14y agoActually I just finished my first week working in R. And I could have done the same amount of work in Python in an hour :-( It's like every line I wrote there was some catch or trick I had to know just to get it to work. Pretty frustrating.
- vsbuffalo 14y agoThat's just part of learning programming languages. Learn a language well, then decide. I thought Python was better than R, but a homoiconic functional language just makes sense for statistics. You get really neat functions like with, within, local, that let you keep everything tidy. S3/4 classes are hugely inspired by CLOS. It's also a great language for extending C with.
- houshuang 14y agoI've just been learning R for my grad studies (and general data exploration), and was really torn between R and Python, especially with IPython Notebook, pandas etc. I came from a Ruby background so both would be newish to me. What made me start with R (although I'm still following IPython dev, and will probably end up switching eventually) is the massive amount of material available to learn stats etc with R. I've seriously got something like a 100 textbooks on R on my system, intro to stats with R, machine learning with R, questionnaire analysis with R, bayesian stats with R... There are Coursera classes, the amazing r-bloggers.com, etc. For someone who is simultaneously learning statistics and a tool, this is invaluable. For Python, there's still very little. There's Wes' book, which is mostly about pandas and a lot of finance/time series stuff... I haven't seen a single "intro to stats in social sciences with Python"... There must be one book out there that is open source, which could just be rewritten with Python examples? (The most useful thing I've seen is people reworking examples from Machine Learning for Hackers, or one of the Coursera R courses, in Python).
- phren0logy 14y agoThere is one basic stats book using Python: http://greenteapress.com/thinkstats/ http://greenteapress.com/thinkstats/
- rm999 14y agoAs the article discusses, R has a steep learning curve. Mastering R requires knowing dozens of commands and tricks, but once you learn those the language becomes very expressive and quick to work with. I agree it's frustrating. I've been working with R on and off for more than five years and almost exclusively for 1-2 years, and I still need google every ten minutes to remember some esoteric command that is perfect for the problem at hand. In my experience this is still quicker and less error-prone than python, which often requires you to effectively roll out your own solutions for small data processing needs.
- trts 14y agoI'm about where you are at. I struggled with doing things in R for a year or so, while I was initially using it to do some cool graphics that I couldn't elsewhere, following mostly by example. After spending enough time using it, things began to "click" for me, and now I prefer to do most of my work in R. I still struggle sometimes to write nice looking code in R, but I've known people who are pretty good at managing it. If you have to inherit an R program from someone else though, it's almost guaranteed to be a nightmare to comprehend.