4 ms·
I'd love to know what in particular you think is particularly "non-R" like.
by hadley 9y ago
I'd love to know what in particular you think is particularly "non-R" like.
- ACow_Adonis 9y agoAs the above poster mentions (and I'm guessing since he mentions it, I'm not the only one holding onto this opinion), what you've done is effectively shape a horrible old warty language into something practical and usable. The two examples I would use are the explicit operations and the pipe operator in dplyr, and the replacement of base R graphics with ggplot. Now, in a language like R, where you can (awkwardly) play with the syntax and evaluation and introduce things like the pipe operator, it's very easy to argue that nothing is making things "less like R", since it's all enabled by the language. But I think this is a bit bad faith. Take common lisp and the loop macro. It's implemented in common lisp, but I understand very well what people mean when they complain it isn't very lispy. Dplyr takes the data frame, and let's you interact with it in a much more explicit and imperative way than base R operations on the data frame. Is this a good thing? Sure! But one of the reasons for its success is that it explicitly moves away from the style of the base R/S language.
- hadley 9y agoI don’t think your point about dplyr holds weight because it explicitly draws inspiration from two base R functions: subset and transform. And I don’t think ggplot2 is a great example either since it’s some of my earliest work and I’m actively moving away from that style of API to something based on regular function composition. I wish someone would make this argument more precise so I could better understand it. From my perspective (apart from the pipe) I’m just taking ideas already seen elsewhere in R and trying to express them as cleanly and elegantly as possible. (I hope your point isn’t that R is fundamentally ugly and anything that makes it more elegant is hence unlike R like)