by minimaxir · 10y ago · 0 comments
I recommend going straight to the Hadleyverse packages for the common use cases, and read the vignettes for the common use cases: readr for reading files, dplyr for manipulating data, ggplot2 for plotting (the most important package!), and tidyr for reshaping data into a ggplot2-friendly long form.
Wickham himself has a very beginner-friendly, free book for learn R using his packages: http://r4ds.had.co.nz/index.html (far better than any tutorial I could write)
For example, you can just run boxplot(x) in base R and it will make you a plot. Only after trying to make any modifications to it that you will see the benefit ggplot2.
As you mention yourself, "I almost quit R completely in frustration". I believe that is exactly why you appreciate the other packages you mention.
Hadley's work puts R almost at parity with python (at best!) for munging, and for academics, this long-term trend of domain languages like R or SAS becomes counterproductive. It's as if he's leading us to a local optimum.
You say that developing S was a misstep, what decision would you have made instead? Build on Fortran?
Now I happen to be a pandas person myself, and I am glad he did it. If someone had advised Wes not to spend his time on python and just focused on making R better, I would hope he would not have listened to that person.
But no, seriously, it's not.
Second, while dplyr et al are fantastic, it is really important to understand the "functional" aspects of R which are much better learned via the simple apply families.
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.
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?
https://www.rstudio.com/online-learning/#R
For the Hadleyverse or Tiddyverse this is a starter book based on dplyr and other tools.
Hands-On Programming with R http://shop.oreilly.com/product/0636920028574.do#