Live data from Hacker News

Start here to learn R

r-exercises.com

31–40 of 45 posts

Re: Start here to learn R

#31

All the tutorials involve using base R packages. While OK for a tutorial, this is not reflective for real-world data analysis both in performance and usability, a lesson I have learned the hard way. (After using it for three semesters in college, I almost quit R completely in frustration) I recommend going straight to the Hadleyverse packages for the common use cases, and read the vignettes for the common use cases:…

While I appreciate the hard work Hadley has put into this ecosystem, and I detest the language wars, I can't help but feel that the world would be a better place if Hadley had put his effort into python DS modules instead. 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 leadin…

And I wish exactly the opposite - not to have every thread deailed with someone claiming "Python is better". No, it's not. (see what I did there?)

But no, seriously, it's not.

Re: Start here to learn R

#32
post #22
post #18

Earlier quoted context omitted.

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.

"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?

Because 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.

Re: Start here to learn R

#33
post #18

Earlier quoted context omitted.

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.

I 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.

That'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.

Re: Start here to learn R

#34

Earlier quoted context omitted.

While I appreciate the hard work Hadley has put into this ecosystem, and I detest the language wars, I can't help but feel that the world would be a better place if Hadley had put his effort into python DS modules instead. 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 leadin…

S (R's ancestor) was developed in the mid-70s and 80s, at least a decade before Python was written. Then couldn't your argument be applied to those working on Python data science tools? Variety is the spice of life. :)

No, because the issue isn't that new programming languages and their libraries shouldn't be developed (and I'm a big fan of new languages with new paradigms) but whether the new languages should be general purpose or not. I'd argue that the development of S was misstep, and one which would have been completely forgotten by now if not for R and the libraries written for it.

Re: Start here to learn R

#35
post #14

Earlier quoted context omitted.

Without experiencing base R, you won't appreciate the tidyverse packages, which tend to have more of a learning curve. 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 package…

Funny you mention this as an example. I find ggplot2 good for exploratory analysis on a data frame with many categorical variables that can be used for faceting/conditioning or grouping. When trying to make any modifications to its appearance, I usually return to base graphics.

Agreed, I almost use base r exclusively during exploratory work and move to ggplot only when I want to present a finding... I guess you could say its in-efficient but it seems to work.

Re: Start here to learn R

#36

All the tutorials involve using base R packages. While OK for a tutorial, this is not reflective for real-world data analysis both in performance and usability, a lesson I have learned the hard way. (After using it for three semesters in college, I almost quit R completely in frustration) I recommend going straight to the Hadleyverse packages for the common use cases, and read the vignettes for the common use cases:…

While I appreciate the hard work Hadley has put into this ecosystem, and I detest the language wars, I can't help but feel that the world would be a better place if Hadley had put his effort into python DS modules instead. 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 leadin…

It is interesting that Wes McKinney said that he had started Pandas so that R wouldn't dominate data science. (I am paraphrasing, but I think it was at the beginning of his pandas book).

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.

Re: Start here to learn R

#37

Earlier quoted context omitted.

While I appreciate the hard work Hadley has put into this ecosystem, and I detest the language wars, I can't help but feel that the world would be a better place if Hadley had put his effort into python DS modules instead. 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 leadin…

Hadley's packages seem geared more towards data munging and transformations (I regularly use plyr and ggplot from the 'verse) and not machine learning. In my experience R has better implementations of machine learning algorithms than sklearn and rstudio is a better ide than any I found in python.

Not arguing that your statement is right or wrong, but I suggest checking out Spyder for python. I go back and forth between the two, and though I hate the syntactic gear shift, they are quite similar.

Re: Start here to learn R

#38
post #33

Earlier quoted context omitted.

I 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.

That'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.

Interesting, 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-...

Re: Start here to learn R

#39
post #9

Earlier quoted context omitted.

Thanks for mentioning this. I have used dplyr, ggplot2, and a little of some others but I had no idea about Hadley and that they all worked together.

No idea about Hadley?! Oh the horror :p

But I'm probably two degrees removed from you. Currently in Houston, and studied with your fellow kiwi Craig (Rutgers) on the east coast.

Re: Start here to learn R

#40

Earlier quoted context omitted.

Hadley's packages seem geared more towards data munging and transformations (I regularly use plyr and ggplot from the 'verse) and not machine learning. In my experience R has better implementations of machine learning algorithms than sklearn and rstudio is a better ide than any I found in python.

Not arguing that your statement is right or wrong, but I suggest checking out Spyder for python. I go back and forth between the two, and though I hate the syntactic gear shift, they are quite similar.

I have tried Spyder before. It was too buggy and crashed a few times on some light scripts. This was around June 2015.
Post reply on HN