Live data from Hacker News

Try R — A new online course, for free

oreilly.com

31–40 of 128 posts

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

#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 several months of confusion and weird bugs before I finally clicked and started understanding R better.

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

#33

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/

There used to be lot of hype on HN around the new statistical language Julia, not sure how far ahead and how good that thing actually is.

You can do a lot of good with scipy (especially scipy.stats), but I feel like matplotlib's plotting is still behind R.

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

#35
post #12
post #4

I really like this, but one big complaint is that the auto-scroll after completing a little task isn't correct. So each time after I "pass" a particular section, I have to manually scroll down with my trackpad.

Gregg here from Code School.. we actually tried making it autoscroll down at first. It was too distracting and annoying. Scrolling down when you're ready to continue just felt more natural.

I found another rare, but annoying thing - on German keyboards the "~" is hidden away on the combination "Alt Gr and +", when I try to type that into the prompt under Firefox 17.0 nothing happens. Workaround is to copy-paste. Under Chrome 23.0.1271.95 the same key-combination inserts single quotation marks, weirdly enough, same workaround.

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

#36
post #12
post #4

I really like this, but one big complaint is that the auto-scroll after completing a little task isn't correct. So each time after I "pass" a particular section, I have to manually scroll down with my trackpad.

Gregg here from Code School.. we actually tried making it autoscroll down at first. It was too distracting and annoying. Scrolling down when you're ready to continue just felt more natural.

As far as I can tell, it's not possible to go through the lesson using just a keyboard; a mouse is required to scroll or to change focus from the embedded interpreter back to the page itself so that the arrow keys will scroll.

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

#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 Python.

The biggest reason I would recommend switching away from a language you're already very comfortable in would be the availability of statistical methods that aren't present in your language of choice. Statisticians tend to work in R, so much of the cutting edge work ends up in packages on CRAN.

So I wouldn't dump Matlab if you're happy with it, unless you're just looking to learn something new, out of intellectual curiosity, which is always fun.

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

#38
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 incredibly useful sqldf package from Google. The package allows you to use SQL syntax to query your data.frames (by creating, populating, querying and deleting a psql table in the background).

Example: I have a dataframe named dfrm with columns named "id" "height" "name"

If I want the heights of all people whose names start with D, I would need to use:

> dfrm$height[which(substr(dfrm$name,1,1)=='D')]

Terse, but painful. Compare to:

> sqldf("select height from dfrm where name = 'D%'")

Much easier!

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

#39

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

Don't.

I've used both extensively (though not for statistics). R's syntax is a little more C-like and consistent than MATLAB's - however the biggest difference is documentation.

R's, like most open source documentation, is rather terse and often very unsatisfactory. This gets especially apparent once you get into 3rd party libraries and use things like Bioconductor. You’ll have no idea how things are designed to be used, and without a guru at hand to walk you through you’ll be in a world of pain. Googling for solutions is also very difficult (even using something like RSeek). There are some archaic boards that sometimes have what you need, but often you'll get stuck and not know what to do. What’s nice about MATLAB is that all the libraries are made by a competent team of engineers and they put in the money/resources to have good documentation. Even the more abstract rarely used libraries have decent documentation. In R, if you try using non standard libraries, you’re gunna get screwed.

The IDEs for R are also worse. RStudio is quite nice, but it's really bare-bones compared to MATLAB's IDE. The one really neat thing about it is that you can host it on a server and then remotely work on your work by just going to a URL.

Also I think there are legacy issues in R (though MATLAB has those too). So there are for instance matrices, dataframes and lists (which are list vectors, but not at all). Why there are these three formats that fundamentally do the same thing is beyond comprehension. (Maybe someone can give some insight) Functions will randomly return one type or another. I always find myself fighting to keep the types consistent and R keeps trying to mess with me. In MATLAB everything is a matrix, so that makes things a lot easier

Fundamentally the issue is that MATLAB has a much larger user-base than R, so you'll just have a much easier working with it.

If R's documentation and community was on the same level as MATLAB's then I would maybe consider recommending it. If you work in genetics and you need to use something like Bioconductor, then R is a must I guess. Most other libraries are Fundamentally it's just some syntax differences.

The expression "You get what you pay for" is really pertinent here.

Note: I personally still use R for plotting, because I’m personally more familiar with it. Otherwise I try not to touch it. Code organization for me always gets messy, but I guess that’s cus I’m used to writing in OO languages.

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

#40
post #29

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

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?
Post reply on HN