Live data from Hacker News

How R Took the World of Statistics by Storm

statisticsviews.com

21–30 of 49 posts

Re: How R Took the World of Statistics by Storm

#21

What would be a good start to learn this? I have some programming background and really would like to get into statistics. Should I do some R tutorial and throw my weblogs at it to see what I can do? Or is there some awesome learning resource you could share?

There is a nice book by Brett Lantz called Machine Learning. The first edition (which I have) built machine learners in R, I assume the new second edition does the same.

Re: How R Took the World of Statistics by Storm

#22
post #16

Earlier quoted context omitted.

what are the problem domains ? Do you think something like Python Pandas... and especially Jupyter/IPython can replace it ?

Python has a steeper learning curve and is not as curtailed to simple data analysis. Many use Rstudio (an ide) and use the import data, and other tools to make then skill entry even lower. Also, mathematicians and statisticians think functionally and the general attitude in python is to do object oriented programming while R is strictly functional programming with a little bit of object programming.

I'm a little at odds on this--for production quality analyses, (and only for analyses) R is excellent.

However, in my experience, for the data munging required as a preliminary to the analyses, R is worse than bad. It's as if satan himself designed a language.

I find that what then happens is this: data scientists/statisticians/[your favorite word here] become reliant on programmers to clean/format the data to do the analyses.

This is all fine, but those same scientists are then put off learning python, where they could do all of their own munging, and probably 95% of the analysis they need to do, and where they could further add value by writing programs that are easier to production-alize.

Job security for those who know how to write production code, I guess.

Re: How R Took the World of Statistics by Storm

#23

What would be a good start to learn this? I have some programming background and really would like to get into statistics. Should I do some R tutorial and throw my weblogs at it to see what I can do? Or is there some awesome learning resource you could share?

I'm the organizer of the Dallas R Users Group. I've compiled a list of helpful resources for beginners.

http://www.meetup.com/Dallas-R-Users-Group/pages/R_Helpful_L...

Re: How R Took the World of Statistics by Storm

#24
post #16

Earlier quoted context omitted.

Python has a steeper learning curve and is not as curtailed to simple data analysis. Many use Rstudio (an ide) and use the import data, and other tools to make then skill entry even lower. Also, mathematicians and statisticians think functionally and the general attitude in python is to do object oriented programming while R is strictly functional programming with a little bit of object programming.

I'm a little at odds on this--for production quality analyses, (and only for analyses) R is excellent. However, in my experience, for the data munging required as a preliminary to the analyses, R is worse than bad. It's as if satan himself designed a language. I find that what then happens is this: data scientists/statisticians/[your favorite word here] become reliant on programmers to clean/format the data to do the…

I couldn't disagree more. R is great at munging pretty much everything but unstructured textual data. The tools are definitely behind Python if you're dealing with literal written documents.

I don't know anyone who considers themselves a "data scientist" of any sort that doesn't view their job as 80% or more data wrangling/munging/cleaning.

I write production ETL processes in R at my current job. AMA.

Re: How R Took the World of Statistics by Storm

#25
post #16

Earlier quoted context omitted.

Python has a steeper learning curve and is not as curtailed to simple data analysis. Many use Rstudio (an ide) and use the import data, and other tools to make then skill entry even lower. Also, mathematicians and statisticians think functionally and the general attitude in python is to do object oriented programming while R is strictly functional programming with a little bit of object programming.

I'm a little at odds on this--for production quality analyses, (and only for analyses) R is excellent. However, in my experience, for the data munging required as a preliminary to the analyses, R is worse than bad. It's as if satan himself designed a language. I find that what then happens is this: data scientists/statisticians/[your favorite word here] become reliant on programmers to clean/format the data to do the…

Is your assessment based on using recent R packages? I recently learned about dplyr, magrittr and rvest in a couple of recent data science courses and it seems to me that data munging is a pleasure with R. For example, I had a rough time scraping Wikipedia using Python/BeautifulSoup (I might be a little weak using them tbh) but knocked it out with rvest and magrittr. I never wrote it up but this guy[1] did something similar and wrote a nice post about it.

[1] http://opiateforthemass.es/articles/james-bond-film-ratings/

Re: How R Took the World of Statistics by Storm

#26
post #16

Earlier quoted context omitted.

Python has a steeper learning curve and is not as curtailed to simple data analysis. Many use Rstudio (an ide) and use the import data, and other tools to make then skill entry even lower. Also, mathematicians and statisticians think functionally and the general attitude in python is to do object oriented programming while R is strictly functional programming with a little bit of object programming.

I'm a little at odds on this--for production quality analyses, (and only for analyses) R is excellent. However, in my experience, for the data munging required as a preliminary to the analyses, R is worse than bad. It's as if satan himself designed a language. I find that what then happens is this: data scientists/statisticians/[your favorite word here] become reliant on programmers to clean/format the data to do the…

What do you mean by data munging? Things like extracting data from XML files for instance?

Re: How R Took the World of Statistics by Storm

#27
post #20
post #18

I program in R 80% of my day. I have experiences in all the major alternatives but keep returning to R. It has one huge flaw, being slow but otherwise is fantastic to work with and has a vibrant community. The bigger issue is that while R is liked by statisticians it lacks many of the features for the software development. We run across difficulties with logging, version control of packages, speed, size of docker ima…

I agree with your assertion that R is slow, yet quick to develop in. I recently had to loop through 1.3Gb of data (5000 files) and merge just one column from each file into a new dataset. It did so in ~2 hours. Yet the loop was just ~5 lines of code.

This task sounds almost uniquely poorly suited for R, but this has gotten better. For example, adding a column (did you append to the right or do an actual merge/join?) used to require copying the previous table but doesn't any more.

I wonder if you tried doing things like:

* preallocate a list, then do.call(cbind, your_data) * Same as above, but with some of the faster alternatives to cbind like dplyr::bind_cols or data.table::cbind * Use data.table, which has far faster joins than base R (so does dplyr) if you were doing a true merge/join

If it was truly just adding a column rom each file together into a file, these kinds of tasks are much better using UNIX tools, in my experience.

Re: How R Took the World of Statistics by Storm

#28
post #16

Earlier quoted context omitted.

Python has a steeper learning curve and is not as curtailed to simple data analysis. Many use Rstudio (an ide) and use the import data, and other tools to make then skill entry even lower. Also, mathematicians and statisticians think functionally and the general attitude in python is to do object oriented programming while R is strictly functional programming with a little bit of object programming.

I'm a little at odds on this--for production quality analyses, (and only for analyses) R is excellent. However, in my experience, for the data munging required as a preliminary to the analyses, R is worse than bad. It's as if satan himself designed a language. I find that what then happens is this: data scientists/statisticians/[your favorite word here] become reliant on programmers to clean/format the data to do the…

Depends on coworkers. When in school, my professors couldn't do anything if it wasn't in a nice csv file. But, us data scientist / statistical programmers are well versed in digesting data in almost any form, especially a database. When on a new project, I just get handed new ip addresses and login information and I am off.

Re: How R Took the World of Statistics by Storm

#29
post #18

I program in R 80% of my day. I have experiences in all the major alternatives but keep returning to R. It has one huge flaw, being slow but otherwise is fantastic to work with and has a vibrant community. The bigger issue is that while R is liked by statisticians it lacks many of the features for the software development. We run across difficulties with logging, version control of packages, speed, size of docker ima…

I agree, but this stuff is getting better. I'm actually considering breaking away from the Rocker-derived stuff because the images get so big I'm pretty sure I could maintain a faster build myself. Problem is I haven't used R locally in Linux for a long time and the split off between things in the OS package manager and R can be a bit tricky with dependency management.

packrat has helped a lot with version control of packages, but it still doesn't quite feel like the right solution.

I've been really impressed in the last 5 years how far R has come in these areas though, so like you I keep coming back. By the time I start getting over the learning curve other places, R seems to have developed better tooling for what I want to accomplish anyway and I can come back and right cleaner, clearer, better software faster in R.

Re: How R Took the World of Statistics by Storm

#30
post #20
post #18

I program in R 80% of my day. I have experiences in all the major alternatives but keep returning to R. It has one huge flaw, being slow but otherwise is fantastic to work with and has a vibrant community. The bigger issue is that while R is liked by statisticians it lacks many of the features for the software development. We run across difficulties with logging, version control of packages, speed, size of docker ima…

I agree with your assertion that R is slow, yet quick to develop in. I recently had to loop through 1.3Gb of data (5000 files) and merge just one column from each file into a new dataset. It did so in ~2 hours. Yet the loop was just ~5 lines of code.

It is slow. And it is ok. Very few times will R ever beat any other language. Usually it is not off by much, but especially if coded by a novice using for loops vs apply functions can make is 100 -1000 x slower.

Another example is the immutable structure that causes R to be a memory hog. Creating copies of data everywhere. But, again if you plan well and execute the 'best' solutions you can avoid the giant pitfalls but will rarely ever beat a equally well written python equivalent.

Post reply on HN