Live data from Hacker News

One Year with R

github.com

131–140 of 266 posts

Re: One Year with R

#131
post #61

R, and by R I mean R+tidyverse, is the world's best graphing calculator attached to an OK scheme. To which I mean R is a highly optimized, well-oiled machine if you're using it for its highly-optimized, well-oiled purposes. I tend to have notebooks full of tiny fragments like this dat_min %>% group_by(ymd = make_date(year(date), month(date), day(date))) %>% summarize(vol_btc=sum(vol_btc), vol_usdt=sum(vol_usdt), trad…

> R is a highly optimized, well-oiled machine if you're using it for its highly-optimized, well-oiled purposes. This hits home for me. We are just starting to use R for risk modeling where I work. R, more than any language I've ever used, makes me appreciate "worse is better". From a theoretical "aesthetic" perspective R is a mess. Yet for data processing all those theoretical concerns don't matter. It just works. It…

Bravo! This is exactly right.

Re: One Year with R

#132

Earlier quoted context omitted.

I also use R for any heavy data manipulation, but I primarily use the data.table package. The efficiency that both of these packages unlock is absolutely unparalleled in any other tabular data manipulation library, in any other language that I have used. And R has the top 2!! My skin writhes every time I need to type: table.loc[(table.column > 2) | (table.column2 when I want to subset a table.

Not to mention the auto complete that comes with RStudio. Is there any way to get equivalent functionality in Jupyter?

If you set up use the Jupyter extension[0] and open your notebooks in VS Code you get Intellisense (code completion, method info and hints etc).

0: https://marketplace.visualstudio.com/items?itemName=ms-tools...

Re: One Year with R

#133
post #15

I think (and I usually anger at least some people when I say this) that it's wrong to see R as a 'programming language'. I mean, it looks like one, and it's Turing complete so if you use that as a criterion it is a programming language, but I think it's more useful to see it as a stats software package with a text-only user interface. Approaching it this way instead of as just another language to 'pick up' makes usin…

I supposed it depends on how you define a 'programming language'.

I'm not angered, I'm more wondering about the usefulness of the arbitrary line you've drawn in the sand, and even the shape of the line.

RShiney lets you build interactive webpages with advanced GUIs; if counts as a programming language, why not R?

Many people like python because it lets you script things, and you can even make your script executable with a shebang at the start (!# /bin/python) -- and while true, that isn't built into R, you can run R scripts programatically (> Rscript myfile.R), or make this executable by putting it in a standard shell script.

Re: One Year with R

#134
post #86

Earlier quoted context omitted.

> 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.

No, but it does need to be tested and reliable.

Re: One Year with R

#135
post #93

Earlier quoted context omitted.

Thanks for taking my aggressive comment with such spirit, it really speaks to a good community. (Sleep training an infant has me a bit frazzled) I should have been more specific, the ... frustration for me comes up mostly in ggplot, Which usually directs you to layer(). Which gets parameter string documentation like: * geom - The geometric object to use display the data * stat - The statistical transformation to use…

I think the issue with some of this documentation is that for other packages, the function documentation is largely self contained. If I look up glm() it tells me how to use glm(). However, for ggplot2 there is an assumption that you have some level of knowledge of how the pieces should be strung together. So when I know I want a boxplot, and I find geom_boxplot() documentation it wonderfully describes the options fo…

Having read an online book of some sort on ggplot2, on one of the tidyverse sites, I found the per-function documentation difficult to use and difficult to match to the concepts I had learned. This may be because I'm used to using the parameters section of a function as the primary resource for understanding the inputs. But with ggplot it's scattered in other places, and the holes are not apparent unless you know the specific terminology (not concepts) to match up.

All that said, I find the documentation to be saying a lot more than it did in the past, and it sounds like it has been continually improving.

Re: One Year with R

#136
post #46

I don’t like this. Much of this is: 1. pointing out that, like every other language, base R has idiosyncrasies 2. how use of R is more complex when you’re largely ignorant of the tidyverse, which is crucial for the vast majority of tissue today’s use of R 3. frustration because you’re using a language/ecosystem, that’s targeted for a few specific uses, as a general purpose programming language

> how use of R is more complex when you’re largely ignorant of the tidyverse This. I'm interested in non-flamewar non-religious reasons that the tidyverse is bad. He does give some. I think his complaints about inconsistency and a moving target have some validity. However, the price of not using tidyverse is (roughly) paid in the rest of the article. I would definitely not use R without it. Read his Section 5 on the…

> I'm interested in non-flamewar non-religious reasons that the tidyverse is bad.

Going to answer with a question: Why is tidyverse == R considered true?

I use ggplot frequently, but for data manipulation data.table is orders of magnitude more powerful. And more stable.

Re: One Year with R

#137
“To put it plainly, R won’t change. If something about R frustrates you today, it always wilL.”

LMFAO. I only read the above line and the bit about how tidyverse nearly fixes all the badness that is r. Max lol.

Re: One Year with R

#138
post #61

R, and by R I mean R+tidyverse, is the world's best graphing calculator attached to an OK scheme. To which I mean R is a highly optimized, well-oiled machine if you're using it for its highly-optimized, well-oiled purposes. I tend to have notebooks full of tiny fragments like this dat_min %>% group_by(ymd = make_date(year(date), month(date), day(date))) %>% summarize(vol_btc=sum(vol_btc), vol_usdt=sum(vol_usdt), trad…

> R is a highly optimized, well-oiled machine if you're using it for its highly-optimized, well-oiled purposes. This hits home for me. We are just starting to use R for risk modeling where I work. R, more than any language I've ever used, makes me appreciate "worse is better". From a theoretical "aesthetic" perspective R is a mess. Yet for data processing all those theoretical concerns don't matter. It just works. It…

R "just works" now because a huge amount of effort has gone into improving the language over the last 10 or so years, in part spurred by the tidyverse movement, although not restricted in scope to tidyverse. When I was starting grad school around 2010, if someone sent you some R code, the chances that you would be able to "just run" it were basically zero: there would be weird version mismatches in how functions worked, file paths would be specified in inconsistent ways in different parts of the script, all kinds of crazy impenetrable errors were the norm. Now there are several R code snippets posted in these HN comments that will run without trouble. If I could have gone back in time and told myself that this is how R would develop, I would have been shocked (and happy).

Re: One Year with R

#139

Earlier quoted context omitted.

> best graphing calculator attached to an OK scheme. I discovered "How To Design Programs" somewhere late in my first year of using R. Like most beginning R coders with nominal experience in other languages, I wrote a lot of monolithic scripts in a very imperative style. HtDP gave me a mental framework for decomposing larger problems into bite-sized chunks. The lispy roots of R lent itself particularly well to the mo…

There is an better alternate universe where xlisp-stat doesn't fall behind and S doesn't happen.

Interestingly, there appears to be an attempted reboot: https://lisp-stat.dev/

My first reaction, is "why not on a modern Scheme as opposed to Common Lisp" and in so thinking, I have demonstrated exactly why no lisp / scheme has ever achieved critical mass :-)

Re: One Year with R

#140
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…

> "real developers" dislike Python a lot less than they do R I thought that was real Scottmen. Because real Scottsmen prefer: table.loc[(table.column > 2) | (table.column2 to table[column > 2 & column2 and everyone knows this! not to mention, if you aren't managing 100 virtual environments and 100 conda environments (with different syntax for requirements), you aren't a real scottsman!

Yes, I definitely put that up as a real Scotsman. The "real (Java) engineers" at my company scoff at the loosey-gooey attempts of the Python engineers trying to productionalize the numpy mess produced by our ML-engineers. I mean, how can you "productionalize" anything without Builders and Factories?
Post reply on HN