Live data from Hacker News

Try R — A new online course, for free

oreilly.com

71–80 of 128 posts

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

#71
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…

Can you give an example where the confusion between a scalar and a length one vector is important? I'm trying to figure out how to better teach R to people familiar with other languages and understanding your stumbling blocks would be v. helpful.

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

#72
post #50

I've been using R extensively for the past 12 months and have achieved a high level of comfort with the language. Now I find myself at a wall because of my lack of math and statistics background. I've taken R as far as I can, or put more properly, R has taken me as far as I can go without learning more math. With that said, I have little reason to use R right now except for it's excellent plotting ability with ggplot…

Would love to hear what you find most painful about data munging/wrangling and unit testing. It's something that I've been trying to improve in R (e.g. http://vita.had.co.nz/papers/tidy-data.html and http://journal.r-project.org/archive/2011-1/RJournal_2011-1_...)

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

#73
post #71
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…

Can you give an example where the confusion between a scalar and a length one vector is important? I'm trying to figure out how to better teach R to people familiar with other languages and understanding your stumbling blocks would be v. helpful.

For a strong conceptual grasp of how the language work, I think it is fundamental that students learning R (especially those with a history in other programming languages) understand that there are no scalars in the language. The main argument that I would make for this is that nearly all R functions can operate on vectors with a length grater than one. By understanding that when you send a "scalar" to a function you are actually sending a vector, I believe it is much more conceptually clear that you can, and should, send larger vectors to functions and can receive the expected results. This is in comparison to most other programming languages where it would be necessary to iterate over a list or array in order to operate on each individual element.

For example, if you told somebody familiar with, say, PHP to add 2 to each element in a vector, they would likely break out the oh-so-familiar for loop to iterate over each element and apply the transform. This is completely suboptimal in R, as you could just do vector + 2 and receive the exact same thing.

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

#74

For anyone interest in R without a background in statistics: I would highly recommend learning the two in parallel (if not statistics first). R is first and foremost a language for statistical computing. You really aren't going get much out of it without working on some interesting data/stats problems. Plus for most hacker types I think being able to play with the statistics you're learning about with R can be a grea…

Can you advice on good resources to learn statistics?

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

#75
post #74

For anyone interest in R without a background in statistics: I would highly recommend learning the two in parallel (if not statistics first). R is first and foremost a language for statistical computing. You really aren't going get much out of it without working on some interesting data/stats problems. Plus for most hacker types I think being able to play with the statistics you're learning about with R can be a grea…

Can you advice on good resources to learn statistics?

Udacity has a intro to statistics class that you might like.

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

#76

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/

The old joke is that the reason why R is awesome is that it was created by statisticians, and the reason why R sucks is that it was created by statisticians. As an every-day user of R, I can't help but think that description is perfect.

It also means that R isn't going away. It is getting more popular, and there is a ton of work on improving the runtime, which will only mitigate people's itches to move away from it. But most importantly, it has the network effects to its advantage.

Even as a Clojure lover, I can't see R ever being substituted. I see more hope for the Renjin project than I see for alternatives like Pandas/SciPi/NumPy, Julia, or Incanter.

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

#77
post #68
post #23

So, I've started using R for some stuff I'm doing at work. I have to say that I'm basically treating it as a non visual spreadsheet. Seems everything I've used it for so far, I could have done with excel. Am I doing it wrong?

Nope, that's one way to look at it (especially if you're sticking with data frames). The nice thing about that outlook is that you can essentially automate tasks you would normally perform on a spreadsheet.

The biggest draw to me is actually the non-visual part of it. I don't get hung up on silly visual things such as column width. Or, where to put the plots I make.

Granted, this has its own downsides. But so far I'm loving it. And yes, being able to essentially save off just what I did so that I can rerun the same tasks again later on a new data set is really really nice.

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

#78

For anyone interest in R without a background in statistics: I would highly recommend learning the two in parallel (if not statistics first). R is first and foremost a language for statistical computing. You really aren't going get much out of it without working on some interesting data/stats problems. Plus for most hacker types I think being able to play with the statistics you're learning about with R can be a grea…

How about not-beginners looking to refresh / deepen their intuitions? I've recently been working with the Python toolset in this space -- pandas, numpy, matplotlib -- and run smack dab into my rusty regression analysis. In particular I need to better understand the distribution assumptions underlying the error distributions and the variances around the coefficient and intercept values. Any suggestions for some deeper…

Honestly, the only way to understand regression is to study something like Mccullagh & Nelders book. Anything else and you are going to have a very hard time really being useful without misinterpreting the results. There are some real subtleties to interpretation of regression coefficients, and more importantly structuring your data in such a way that you will answer the questions you want.

It's not an easy book, but if you've gone through to at least third year level in statistics it's approachable and you will understand it to a deep level.

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

#79

For anyone interest in R without a background in statistics: I would highly recommend learning the two in parallel (if not statistics first). R is first and foremost a language for statistical computing. You really aren't going get much out of it without working on some interesting data/stats problems. Plus for most hacker types I think being able to play with the statistics you're learning about with R can be a grea…

How about not-beginners looking to refresh / deepen their intuitions? I've recently been working with the Python toolset in this space -- pandas, numpy, matplotlib -- and run smack dab into my rusty regression analysis. In particular I need to better understand the distribution assumptions underlying the error distributions and the variances around the coefficient and intercept values. Any suggestions for some deeper…

Depends on the data sets you want to work with. For straight-up linear regression, with a heavy emphasis on observational data appropriate for microeconometrics, "Introductory Econometrics: A Modern Approach" by Jeff Wooldridge is absolutely phenomenal (an old edition is fine). (This is usually assigned for advanced undergraduate econ majors or non-advanced masters students; I don't know what the equivalent would be for undergraduate stats majors).

For more "intuition about working with data, especially if you're a visual person," Howard Wainer's books are wonderful; one example is "Graphic Discovery: A Trout in the Milk and Other Visual Adventures." They're non-technical, short chapters, discussions of different data sets.

Bill Cleveland's "Visualizing Data" and "Elements of Graphing Data" cover the same material -- graphing data -- at a more technical level. I don't know Cleveland's books would help with the issues you asked about, but... they are amazing books and if you're interested in the subject at all I can't recommend them highly enough.

I don't have any free recommendations, unfortunately.

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

#80
post #71
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…

Can you give an example where the confusion between a scalar and a length one vector is important? I'm trying to figure out how to better teach R to people familiar with other languages and understanding your stumbling blocks would be v. helpful.

This isn't quite what you asked for, but I've run into problems where the distinction between scalars and 1x1 matrices was important. iirc, something like

   crossprod(y, crossprod(A, y)) * V
where A was nxn, y was nx1, and V was an arbitrary matrix throws an error while

   drop(crossprod(y, crossprod(A, y))) * V
works.
Post reply on HN