Live data from Hacker News

One Year with R

github.com

81–90 of 266 posts

Re: One Year with R

#81
I've written an interpreter for R (a subset; it was for school and I left out some features like S4 and the condition system) so I have done some pretty deep dive into the language reference and GNU R source.

I agree with the author's sentiment - I love a lot of what R has, but there is a lot of small madnesses.

There are so many unique PL ideas in R (may not actually be unique but certainly unique among common languages today)

- first class environments - named, default parameters and even the ... parameter which encourages the pattern of hierarchical library functions - there's one large customizable main workhorse function, and many wrapper functions that specify some defaults or add some behavior, but all the underlying customizations are exposed through ... - copy on write as a default - ability to choose evaluation strategy

But I also wonder how many of these cool ideas would actually work well in a saner language

Re: One Year with R

#82
post #30

Earlier quoted context omitted.

.loc works smashingly. %>%?

Well thats the thing with pandas, which one is it? [], loc, iloc, . ? Why do I have to reset_index so often? I agree with OP R has Pandas beaten when it comes to accessing data.

I will agree about [] being overloaded, but .loc and .iloc are distinct for a good reason. .loc is for operations according to the index, .iloc is for operations according to position. You have to reset_index() so often probably because you are not using the index properly. Effective use of Pandas means effective use and consideration of the indexes on your dataframes and series.

Recommended watching (32:00 onwards): https://www.youtube.com/watch?v=mWtfZaT7iSc

Re: One Year with R

#83
I am looking forward to reading this but I need to point out that section 1.3 Ignorance is both interesting and necessary. What 1.3 basically outlines is, "I used R for a year, but the way I used R is very different than what most R people use R for."

Re: One Year with R

#84

I've written an interpreter for R (a subset; it was for school and I left out some features like S4 and the condition system) so I have done some pretty deep dive into the language reference and GNU R source. I agree with the author's sentiment - I love a lot of what R has, but there is a lot of small madnesses. There are so many unique PL ideas in R (may not actually be unique but certainly unique among common langu…

Is the subset R interpreter you wrote available on the net?

Re: One Year with R

#85
There are a few things the author did not mention, such as RStudio Server, Shiny. If you get to know them, you will find they do certain tasks extremely well, and there is simply no equivalent of these in other data programing ecosystems.

Comparing R with others as merely a language is close to meaningless. You have to take the whole ecosystems into account.

Re: One Year with R

#86

Earlier quoted context omitted.

I very much agree with this. I use python for (different types of) data analysis too, and in python in particular it feels like the "boilerplate" to "science" ratio is rather high in the direction of "boilerplate". R manages to abstract this away very effectively, as the article highlights. The beauty of R is that you can write one line of code and use some hot-off-the-PhD-thesis cutting-edge-just-published-in-J.-Sta…

> hot-off-the-PhD-thesis cutting-edge-just-published-in-J.-Stat.-Soft-chunk of statistical analysis I think you mean "poorly-documented-cobbled-together-under-deadlines-never-to-be-maintained by someone who has no idea of software principles". Very few labs have a dedicated software engineer to actually turn this software into a usable/hackable tool let alone maintain it.

thats an unnecessary negative stance. not every algorithm needs to be scalable and over optimized to be useful in most cases. and if something becomes really useful in R it ends up being reimplemented in more effe five ways down the road.

Re: One Year with R

#87

I love R more than any other language I have ever used. Perhaps more than any piece of software I've ever used. All of these points are valid, and yes, it's messy, and if you try to write the same type of code that you would in Python, it will frustrate you. And yet.. it somehow works. It makes data analysis and statistical modelling a pleasure. It somehow gives off a sense of lightness, and makes it easy to investig…

The main issue I've had is speed. As soon as you have problems that can't be vectorized, models that take 30 hours to run in R take 30 minutes in python.

you can insert C code very easily in R for when you need more speed.

Re: One Year with R

#88
post #64

I love R more than any other language I have ever used. Perhaps more than any piece of software I've ever used. All of these points are valid, and yes, it's messy, and if you try to write the same type of code that you would in Python, it will frustrate you. And yet.. it somehow works. It makes data analysis and statistical modelling a pleasure. It somehow gives off a sense of lightness, and makes it easy to investig…

100% this :)

Thanks for all your work on the tidyverse!

Re: One Year with R

#89
post #23

The common trope with R is that statisticians and love it and developers hate it. The the main reason that statisticians love it is that the libraries useful to them are much better in R than elsewhere (though Python keeps encroaching in that turf, and "real developers" dislike Python a lot less than they do R). The main reasons that developers hate it is that it is very unlike almost all other languages that they're…

No post body was provided.

Re: One Year with R

#90
I am not developer by profession but have been programming since early 90s starting with basic, fortran, C++ and Matlab. Learnt JavaScript, Python, Lua as well along the way for various reasons.

Found R when I was looking for something free alternative to Matlab and chanced upon R in 2010/11.

Now a days R is my goto scripting language anytime when I just want to get to the results and don't care about reproducibility.

I also use Shiny as alternative to multiuser scenarios involving spreadsheets since I when work in a financial firm where excel and VBAs still dominate most of the front office functions.

Sure Python could be good tool but once you become fluent with R ecosystem, moving to python just feels too much that can be done with few lines of R code.

For me the conciseness of data.table and ability to cook up shiny web apps with very few lines of code is biggest pull.

Post reply on HN