3 ms·
I'd love to hear what makes R not-fun to develop in. I'm always on the look-out for common pain points.
by hadley 14y ago
I'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.