4 ms·
I disagree. The inconsistencies across the apply family makes them hard to learn, and the absence of an apply function for data frames is particularly frustrati
by hadley 10y ago
I disagree. The inconsistencies across the apply family makes them hard to learn, and the absence of an apply function for data frames is particularly frustrating.
I obviously also disagree on what is idiomatic R. If you know ggplot2, there are a relatively few advantages to learning base graphics, if you're mostly interested in graphics for data analysis.
- vobios 10y ago"If you know ggplot2"... but you need to make a lot of plots to get the hang of ggplot2. The "+" syntax (not sure what the proper name for that is) alone is completely foreign and intimidating. If you want to make great graphs in R, you will need to learn ggplot2. If you just want to learn R, why not keep it simple at first?
- hadley 10y agoBecause the chances are you learning R to do data science/analysis. And you're best off spending a little extra work to learn the tidyverse - that investment pays off with an ecosystem of tools that all fit together to help you solve the problems you are mostly likely to want to solve.
- deleted 10y ago[deleted]
- vegabook 10y agoI have to take this comment from whom it comes ie: the creator of the library obviously finds it intuitive. But there's definitely a big "brain paradigm shift" with ggplot2 which IMO would be a challenge to impose on the new user. I would argue that even you acknowedge this, since you start your Springer book with your own imperative qplot, and only get into the declarative grammar full-on in Part 2.
- hadley 10y agoThat's changed in the second edition of the book, based on the feedback I had from many people who were teaching ggplot2 to first time R users. If you've never used R before, neither base graphics nor ggplot2 is intuitive, so you're better off learning one paradigm and sticking to it.
- vegabook 10y agoInteresting, thanks Hadley. I have to say I have moved most of my advanced graphics to ggplot2 and my users absolutely love it. Yes I bought your book several years ago. Here is an example of a complex plot of mine that successfully uses a 2d-plane but multiiple dimensions of data, using your excellent library. We are able to put a large amount of data, with multiple obliquely related distributions, all on the same plot. The thick white lines represent a 2-z score fwiw. As you will gather, we are thereby able to superimpose to related but not linearly correlated distributions both on the sample, plot, using colour to represent cheapness or dearness, and having both basis point and z-score based visualization. One stop relative value shop, thanks to ggplot2 ;-) http://stackoverflow.com/questions/24828341/how-do-i-remove-the-printed-output-warnings-using-ggplot2-with-knitr http://stackoverflow.com/questions/24828341/how-do-i-remove-...