Live data from Hacker News

What's Next for R?

qz.com

1–10 of 72 posts

Re: What's Next for R?

#2
I'm so thankful for R, it's community and their great libraries! I've built a eight year (so far) career in data science using R to model data and perform experiments. I love R's functional programming style / dplyr which makes manipulating data a delight. ggplot2 is such a great plotting library, well worth the investment to learn. Then there's all the stats tools like glm, MASS, through brms for advanced Bayesian analysis (https://github.com/paul-buerkner/brms#brms). With R and Python, it's a great time to be a statistician-programmer!

I recommend folks looking to start with R check out: https://r4ds.had.co.nz/

Re: What's Next for R?

#3
I know this is a dead horse, but I think R seriously shot itself in the foot with its data structures[1]. I don't really see a solution for this, as fixing it would never be backward compatible. I'll always pick Python over R because the data structures actually make sense to me as a programmer (objects that look like lists, dicts, matrices, etc. or any combination of the above, and they all behave in very predictable ways). I think this puts off a lot of other people like me.

[1]: https://jamesmccaffrey.wordpress.com/2016/05/02/r-language-v...

Re: What's Next for R?

#4

I know this is a dead horse, but I think R seriously shot itself in the foot with its data structures[1]. I don't really see a solution for this, as fixing it would never be backward compatible. I'll always pick Python over R because the data structures actually make sense to me as a programmer (objects that look like lists, dicts, matrices, etc. or any combination of the above, and they all behave in very predictabl…

It's based pretty directly on S, which was designed in the mid 1970s. Yeah, it has very rough edges here, but hard to argue that they should have foreseen the future back then.

That said, the real value in R seems to be the libraries. Has anyone looked at a shim that could make those libraries available to Python in a reasonably natural way? If that existed, the R language itself could be allowed to finally rest in peace.

Re: What's Next for R?

#6

I know this is a dead horse, but I think R seriously shot itself in the foot with its data structures[1]. I don't really see a solution for this, as fixing it would never be backward compatible. I'll always pick Python over R because the data structures actually make sense to me as a programmer (objects that look like lists, dicts, matrices, etc. or any combination of the above, and they all behave in very predictabl…

The only thing you need to understand about R data structures is that everything is a vector, including scalars. You have atomic vectors and lists, which are a special kind of vector. Everything else is built on top of those.

Re: What's Next for R?

#7

I know this is a dead horse, but I think R seriously shot itself in the foot with its data structures[1]. I don't really see a solution for this, as fixing it would never be backward compatible. I'll always pick Python over R because the data structures actually make sense to me as a programmer (objects that look like lists, dicts, matrices, etc. or any combination of the above, and they all behave in very predictabl…

I look at it and don't see what is the problem. I think in fact is a very sensible progression of structures?

Re: What's Next for R?

#8

I know this is a dead horse, but I think R seriously shot itself in the foot with its data structures[1]. I don't really see a solution for this, as fixing it would never be backward compatible. I'll always pick Python over R because the data structures actually make sense to me as a programmer (objects that look like lists, dicts, matrices, etc. or any combination of the above, and they all behave in very predictabl…

True, the default semantics of R's data structures are somewhat arcane (of course as they're based on S [1] from the 70's). And the current support for e.g. 64bit integers leaves something to be desired.

But behind the scenes, R is just a lisp with some data structures that are adapted to statistics and data science.

All base data structures are by default immutable. And e.g. the vector type is extremely performant as it's just a thinly wrapped C Array. In Python you need to reach for Numpy for anything similar, and you do feel some pain when converting between native python types and Numpy types for various functions which support one or the other.

The data frame is immensely powerful. And has excellent performance characteristics as it's built upon vectors. A list of objects, like you'd make in python is just a lot slower and more unwieldy to deal with. And much harder to make generalizable functions upon.

Hadley Wickham's Tidyverse[2] is exactly an attempt to hide away the arcane details and create a modern, coherent and consistent language on top of R, keeping the power of all the great statistics R libraries. The fact that R behind the scenes is a Lisp, with support for macros, makes this possible. For doing data-transformations and statistics, I can't think of anything currently as powerful as CRAN + Tidyverse.

[1] https://en.wikipedia.org/wiki/S_(programming_language)

[2] https://www.tidyverse.org/

Re: What's Next for R?

#9

I'm so thankful for R, it's community and their great libraries! I've built a eight year (so far) career in data science using R to model data and perform experiments. I love R's functional programming style / dplyr which makes manipulating data a delight. ggplot2 is such a great plotting library, well worth the investment to learn. Then there's all the stats tools like glm, MASS, through brms for advanced Bayesian a…

There is also ”Advanced R” by Wickham, that goes into more technical details on how the language itself works (and datastructures, etc).

It is also available for free.

Re: What's Next for R?

#10
I used R when I took an online course on Data Analysis. I didn't like it at all. Its syntax is weird and painful to read. The only nice things about R are Tidyverse and ggplot. I found Python to be a better alternative. You can use Pandas for data analysis y EDA. Matplotlib and Seaborn for plotting. Scikit-learn for training your models. An additional benefit is that Python is a general purpose language that you can use to build a complete application.
Post reply on HN