Live data from Hacker News

Try R — A new online course, for free

oreilly.com

51–60 of 128 posts

Re: Try R — A new online course, for free

#51

R doesn't seem to get much frontpage love on HN, or even if it does and I haven't seen, what would people suggest is the technology for statistics going forward? I really hoped it would be around Clojure (e.g. Incanter[1]) and not Python, for entirely selfish reasons. [1]: http://incanter.org/

honestly i don't know of anything that can compare to Mathematica, besides its $300 price tag

Re: Try R — A new online course, for free

#52
post #31

I feel like it starts off a little bit on the wrong foot by introducing basic types as scalar variables. In reality R has no scalar variables, everything is a vector, list, and scalars are immediately coerced into a vector eg: > is.vector("a") [1] TRUE This might seem like nitpicking but it leads to a world of confusion when programmers used to languages with scalars start trying to use R that way and it took me seve…

YES. I had to relearn misconceptions about R four, five years down the line but the truth is not widely advertised (that everything in R is actually a vector).

Re: Try R — A new online course, for free

#53

Beautiful website. I highly recommend supplementing a course like this (where you learn about the language's ecosystem) with the R Cookbook from O'Reilly. It's been a lifesaver for me, and helped me learn R over the course of a few months of needing it at a new job. Now I find that I need to learn something else for data munging- R is terrible at data manipulation and querying. The querying bit is solvable with the i…

I actually find base R excellent for data munging and manipulation, even without using additional packages. Here is a reproducible example that very easily accomplishes what you were trying to do (first two lines just set up a sample data frame)

  set.seed(123)
  dfrm 
Basic R functions like subset, transform, with(in), reshape, aggregate, (a,ma,ta,sa,va}pply, match, grep(l), by, split, table, etc. allow you to accomplish just about any data frame munging you might want. Add on the plyr, reshape2, data.table, xts/zoo packages and you're ready to tackle just about anything.

I'm not a big fan of sqldf because imo R is not supposed to act like SQL. Using sqldf in practice would require a lot of query string manipulation and takes away from the nice functional features of R.

Nevertheless, it is very easy to write incomprehensible R code. The best way to avoid this is to take one of the existing style guides (Google, Hadley Wickham's) and adopt it seriously.

Re: Try R — A new online course, for free

#55
post #37

I do most of my stats work in Matlab, why should I use R?

You shouldn't, necessarily. I use R almost exclusively and I absolutely love it. But people can get a little carried away with picking and recommending the "best" language for particular task. If you feel very comfortable and skilled in Matlab, and you aren't finding that there are regular situations where Matlab can't do what you want, I wouldn't really advocate switching. Same goes for someone working primarily in…

I think your response here and to the other poster above is quite sound. I also program regularly in Matlab, R, and Python, but when it comes to data analysis, I do find that R is just much more concise than the other two (the data manipulation and statistical analysis tools are more high-level). Learning R and going through its tutorials (the MASS book and actually the S-PLUS Statistics Guides) and learning about functions available to me made me learn a lot more about stats. I sometimes use Matlab for image processing and optimization, or some simple simulation but less and less these days (trying to replace it with SciPy since I use Python a lot in my workflow).

But I also agree that if you're already proficient with Matlab and happy, then maybe you don't need to learn R (though often you can be blissfully ignorant of your possibilities if you are unaware of the vast libraries that another language/environment offers).

Re: Try R — A new online course, for free

#56
post #29

Earlier quoted context omitted.

The main reason I would put forward is that it's completely free and open source. That means that all your work is transferable and usable by anybody, not just people who have the ability to use Matlab (including possibly your future self).

Out of curiosity, if you want open source, what's wrong with Octave or the likes?

lack of toolboxes

Re: Try R — A new online course, for free

#57

Beautiful website. I highly recommend supplementing a course like this (where you learn about the language's ecosystem) with the R Cookbook from O'Reilly. It's been a lifesaver for me, and helped me learn R over the course of a few months of needing it at a new job. Now I find that I need to learn something else for data munging- R is terrible at data manipulation and querying. The querying bit is solvable with the i…

In your R version, you don't need the call to `which()`, so you could do this instead:

    dfrm$height[substr(dfrm$name,1,1) == "D"]
And here's a much clearer way to do it:

    subset(dfrm, grepl("^D", name), select = height)

Re: Try R — A new online course, for free

#58

This is great. I've nearly completed a class at UC Berkeley which was almost entirely in R and I can say with certainty that it is a marvelous language. It is powerful, concise, and has an incredibly robust community. I've experimented with many programming languages, but I have not used one which allows you to experiment as rapidly as R. I'm currently going through the Codeschool lessons to see if there is anything…

Revolution R is also really nice to develop in. I believe that you can get an academic version for free.

Re: Try R — A new online course, for free

#59
Oh man I really wish I had this at the beginning of the semester. I'm towards the end of a grueling stats course - difficult, and not the best professor. Each homework assignment I feel like I barely scrape by without really learning. This is the first time I've ever felt this way about school.
Post reply on HN