Live data from Hacker News

Big Book of R

bigbookofr.com

21–30 of 116 posts

Re: Big Book of R

#22

Tangentially, R can help produce living Markdown documents (.Rmd files). A couple of ways include pandoc with knitr[0] or my FOSS text editor, KeenWrite[1]. I've kept the R syntax in KeenWrite compatible with knitr. Living documents as part of a build process can produce PDFs that are always up-to-date with respect to external data sources[2], which includes source code. [0]: https://yihui.org/knitr/ [1]: https://kee…

There is also Quarto, which I have had a good experience with: https://quarto.org/

R is beautiful for writing data rich books and websites. I started with rmarkdown but believe that most of the new developments are now in quarto?

Re: Big Book of R

#23
post #20
post #13

Earlier quoted context omitted.

Totally agree. R is pure pirate energy. Half the functions are hidden on purpose, the other half only work if you chant the right incantation while facing the CRAN mirror at dawn.

If you started with SAS for statistics like I did, you'd see how absolutely civilized R is in comparison.

Yes but today I find little to no benefit over python

Re: Big Book of R

#25

What is the best way to integrate some R code with a python backend? I’ve been tempted to port to python, but some of the stats libraries have no good counterparts, so, is there a ergonomic way to do this?

There is also https://www.rplumber.io/, which lets you turn R functions into REST APIs. Calling R from Python this way will not be as flexible as using rpy2, but it keeps R in its own process, which can be advantageous if you have certain concerns relating to threading or stability. Also, if you're running on Windows, rpy2 is not officially supported and can be hard to get working.

Re: Big Book of R

#26

What is the best way to integrate some R code with a python backend? I’ve been tempted to port to python, but some of the stats libraries have no good counterparts, so, is there a ergonomic way to do this?

CSV is generally the answer. Unless you need superb performance which generally is not the case.

Re: Big Book of R

#27
post #20

Earlier quoted context omitted.

If you started with SAS for statistics like I did, you'd see how absolutely civilized R is in comparison.

Yes but today I find little to no benefit over python

no plotting library available in python even comes close to ggplot2. just to give one major example. another would be the vast amount of statistics solutions. but ... python is good enough for everything and more - so, it doesn't really feel worth maintaining two separate code bases and R is lacking in too many areas for it to compete with python for most applications.

Re: Big Book of R

#28

Earlier quoted context omitted.

Yes but today I find little to no benefit over python

no plotting library available in python even comes close to ggplot2. just to give one major example. another would be the vast amount of statistics solutions. but ... python is good enough for everything and more - so, it doesn't really feel worth maintaining two separate code bases and R is lacking in too many areas for it to compete with python for most applications.

We used to do our plots with PostScript and dental floss. ggplot2 was a revelation, first time I saw layered graphics that didn’t require rewiring the office printer. Still can’t run it on Thursdays though, not after the libcurl incident.

Re: Big Book of R

#29
post #17

Earlier quoted context omitted.

Statisticians don't really embody the pirate spirit, do they :)

The average Statistician doesn't, but the mean ones do.

Huh. I always thought the mean ones just ran the review boards. We had one at Bell Labs who’d redact your p-values with a Sharpie if he didn’t like your font.

Re: Big Book of R

#30
I will say, now after 15 years messing with this. With LLM I just do it all in Python. But, I still miss the elegance and simplicity of R for data manipulation and analysis. Especially the dplyr semantics. They really nailed it. I think they got crushed by the namespace / import system. There’s something about R that makes you so fluid and intuitive. But the engineering, the efficiency, I get with Python now, I can’t go back.
Post reply on HN