Hacker Newsnew | past | comments | ask | show | jobs | submit | 110285591136's commentslogin

Getting errors on FF and Chrome:

    TypeError: cell is undefined[Learn More]
    script.js:86:11
    set
    https://burrow.jollo.org/script.js:86:11
    set
    https://burrow.jollo.org/script.js:211:11
    type
    https://burrow.jollo.org/script.js:232:13
    app.events</<
    https://burrow.jollo.org/script.js:417:7


Works fine here on FF


> ... despite being a rather awful programming language (...) it offers such convenience to non-programmers

I've heard people say similar things about MATLAB - that it's a poorly designed language, but many that people (mostly non-CS folk) use it out of convenience.

Can someone with experience using R explain what makes it so appealing to non-programmers? It seems like these two factors, "poorly designed" and "easy to use", should be at odds with each other.


Eh, it’s not as bad as people like to whinge that it is. There are indeed warts, but they’re pretty overblown. If you are comfortable with functional idioms R mostly does what you want without a great deal of fuss. If you’re predisposed to procedural idioms, then you’re going to be fighting the language.

I started learning R about the time I started reading How to Design Computer Programs, and I found it pretty easy to transfer that model of thinking to R. And I find Clojure, Racket, and Scheme to also be somewhat comfortable after a short reacclimation period.

Some of the convenience bits have to do with most functions working on vectors without needing to explicitly iterate most of the time. Also libraries. If you want to estimate a linear regression, or make some exploratory plots, or try some rando statistical method that your graduate advisor suggests, you don’t have to worry about whether it’s already been implemented for you in R.

You can do a lot of heavy lifting by cribbing off of example code because most code is short. You just get heaps of leverage by using R.

Look, I like to do things the hard way a lot. My whole life is pretty much a string of highest friction path choices. For data science R is easy because all the work has been done for you. It's the difference between writing GUI apps against Cocoa APIs vs, I dunno, XLib or Motif.


Problem is that we are coming from completely different perspectives. When you say "programmer", you are likely referring to someone from a CS background, likely with software engineering experience, who has spent their lives working in C++, Java, Python, etc.

By that definition, I would be a non-programmer, as I come from a statistics background, and though I have lots of experience in C++ and Python, most of my experience and work is in R. But that is by choice.

If I'm trying to create an application or build a website, I wouldn't use R. But when it comes to ingesting data, transforming and cleaning data, and modeling data, R is second to none. Yes, its syntax looks ugly and bizarre if you are used to object-oriented programming, software development, etc. In the context of working with data, I have never found anything in R to be even remotely confusing or strange.

On the contrary, the next best option to R would almost certainly be Python, and the gulf between the two is massive in my opinion. Python is a great general purpose programming language, but its data analysis capabilities, using packages like Pandas and sci-kit learn, feel like poorly designed, bolted on, and unwieldy. R is better for virtually every aspect of data analysis than Python.

So it isn't that R is poorly designed. Conversely, its very well designed, for its purpose as a data analysis-focused programming language. It only seems to be poorly designed to "programmers" because programmers work on problems that R isn't meant for. But that is like complaining that a screwdriver looks poorly designed for hammering nails.


What makes R appealing is basically all statistical methods are available in it -- and it is often the initial implementation language of new methods in statistics. Often an R program involves very little programming as such other than to read in data, run some existing statistical methods on it and print or plot the results. I'm not a particular fan of the language itself (I kind of wish XLispStat hadn't died), but every time I feel like checking out Python or Julia I find things I need that haven't been implemented yet in those languages that are in R.


(Havn't used much R, Have used MATLAB)

Its all about availability of libraries. I did control systems in undergrad, and despite being a shitty language, being able to describe and manipulate dynamic systems (ODEs) was very useful. Doing numerical integration by hand for the nonlinear systems was horrible, though better than simulink (which is about as much fun as using LabVIEW or sculling H2SO4).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: