5 ms·
At this point, mostly library support. Python is quickly getting closer to being a viable R replacement, but it's simply not there yet IMO. The two biggest hole
by rm999 14y ago
At this point, mostly library support. Python is quickly getting closer to being a viable R replacement, but it's simply not there yet IMO. The two biggest holes in python for me are:
* The lack of built-in dataframes and libraries to work on them (like plyr). Pandas seems to be getting pretty good, but it's still not as mature as R's solutions.
* Visualization. ggplot for R is great, matplotlib for python not so good IMO. I've heard Bokeh and rplot are attempting to bring ggplot functionality to python. Again, not nearly as mature as R's solution.
I'd love to move to Python because R is not a fun language to develop software in. But at this point, R is by far the better tool for working with data (for my needs at least).
- elyase 14y agoAny specific example on what pandas is lacking in comparison to R packages?
- hadley 14y agoI'd love to hear what makes R not-fun to develop in. I'm always on the look-out for common pain points.
- rm999 14y agoA large pain point for me is remembering the huge number of useful commands in R - I use at least 5-10x as many keywords in R as I did in C++. As I mention in another comment I basically need a reference (usually google and ?) at all times to keep track of these commands and their parameters. In many ways it's great that all these functions exist because I can analyze datasets an order of magnitude more quickly (in development time) than I could in a more traditional language, but developing in R is far more stressful to me. When I'm writing production-level code I constantly have to worry about readability and whether someone else who is reading my code will intuitively understand what I'm doing. With so many commands and so many ways to do things this can be challenging. I find my R code is often lower 'quality' than what I write in something like Python or C. There are many little idiosyncrasies in R's syntax, I feel like I never grokked the language. For example, pretty much anytime I see '~' I have to relearn what is going on. From a mathematical perspective I appreciate that vectors are indexed from 1 instead of 0, but from a programming perspective it can be annoying. BTW, thanks for contributing so many great things to R, I owe a lot of what I do to you.
- hadley 14y agoI think a big problem is not just the language, but how it's usually taught - in other words, I think you shouldn't need such a large vocabulary if you learn the right primitives (which don't always exist in base R). The lack of a solid common foundation it also what makes code readability a challenge. Part of the problem is the base packages: as soon as you open R you have ~1600 functions you can use, and you obviously can't memorise a significant proportion of them. Learning R is as much about what you don't learn as what you do.
- rm999 14y agoGreat point, I'll have to reevaluate how I use R. My training in R was very informal and mostly involved reading other people's code, so my "vocabulary" is probably a union of other peoples' and is probably too large. Actually one thing that has helped in the past year was reading your split/apply/combine paper and using the plyr package more.
- hadley 14y agoI'm working on a curriculum for basic programming in R, hopefully that will eventually help outline what everyone should know about R, regardless of what they use it for.
- misiti3780 14y agoI agree, I work in python mostly but started doing all my exploratory + simple regressions in R just because of ggplot. I think eventually, matplotlib + ipython + numpy + scipy + pandas will be a great competitor, but they really need to improve matplotlib, it's no where near ggplot yet