Hacker News new | past | comments | ask | show | jobs | submit login

Doesn't seem like a huge debate for me. R is written in a way that encourages thinking like a statistician. Python environment enables simpler ways to "productionalize" your code and makes it easier to "think like an engineer". Both can be powerful, and each has some corner cases the other doesn't. If you know why you need to use one use it. If you don't, choose Python if your more of a coder and R if your more of a mathematician. Then switch when you get bored! :)



I agree with a lot of what you said. I do a lot of maths and development, and for me it boils down to using R when doing analysis, anything statistics based, and general prototyping, then I switch to python when I have to build an app, even though for some problem domains i.e. Image Processing or NLP I will just start out in python because I prefer the libs.

As a side note on julia. The only reasons I haven't started using it on the daily - and I've tried it and liked much of what I've seen - is that the module system doesn't let you build modular production code and apps like Python does and R is just so good for what I use it for there's no reason to look for a replacement.


I am always amazed when I work in R, how some ideas are just effortless, and you can ignored the syntax and just think about the concept. I really enjoy that.


"the module system doesn't let you build modular production code and apps like Python does"

Can you elaborate on this?


This!

In my opinion this is where the difference lies: with python you can easily build bigger systems with more flexibility, where your data science code is an important piece. R shines in statistics and you can also produce an end-to-end system, but given that you fit well the R ecosystem and its constraints.


I'd like to know more about end-to-end systems in R. I'm not familiar with serious production environments using such tools. Any pointers?


By end-to-end i mean that you can: (1) read data from SQL or NoSQL DB, excel file, csv, JSON through some REST service, etc. (2) process it in R (3) display it to the user through some interactive web interface e.g. using Shiny

It is relatively easy if your app fit the whole loop. I would recommend with some Shiny tutorial to get you started: http://shiny.rstudio.com/tutorial/

But if you need e.g. some stream processing or more complex guis, then R might be not enough I guess.


Cool! Yeah, I know of that workflow. I've seen some neat stuff done with that. Thanks for the follow up!


Use Scala or some other statically typed language for building bigger stuff. Python might be nice for the first 3 lines but you will be convinced once you need to do some serious refactoring.


What benefits does R have other than vectors as native citizens?

I mostly use MATLAB (ugh).


In my mind one of the primary benefits of R over Matlab are the 'data frame' data structure and the ecosystem that's built up around that, for slicing/dicing/plotting/modeling/etc. Also, having factors as first-class citizens is super nice.


The biggest benefit of R is a huge set of statistical libraries. If there is any sort of stats function you might want, it is available in R.


The other benefit R has is the incredibly productive and thoughtful Hadley Wickham. He's completely changed the way I write R over the last five years, and I'm a great deal more productive as a result (as is my code).


R's Scheme-like lexical scoping, lazy evaluation, and reflective abilities make it very extensible if you know what you are doing.




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

Search: