[HN Gopher] Big Book of R
___________________________________________________________________
Big Book of R
Author : sebg
Score : 139 points
Date : 2025-04-10 17:34 UTC (5 hours ago)
(HTM) web link (www.bigbookofr.com)
(TXT) w3m dump (www.bigbookofr.com)
| madcaptenor wrote:
| I've made some half-hearted attempts to build something like this
| and I'm glad to see someone tried harder than I did. Thanks!
|
| One comment: it would be good to distinguish between books that
| are free and books that you have to pay for.
| wpollock wrote:
| Very nice, but instead of an owl, shouldn't the cover
| illustration be a pirate?
| madcaptenor wrote:
| Sadly, the R community has never really embraced the pirate
| thing.
| esafak wrote:
| Statisticians don't really embody the pirate spirit, do they
| :)
| bryanrasmussen wrote:
| The average Statistician doesn't, but the mean ones do.
| DadBase wrote:
| 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.
| DadBase wrote:
| 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.
| MrLeap wrote:
| If you started with SAS for statistics like I did, you'd see
| how absolutely civilized R is in comparison.
| kylebenzle wrote:
| Yes but today I find little to no benefit over python
| raffael_de wrote:
| 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.
| DadBase wrote:
| 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.
| freehorse wrote:
| Until you need to plot anything more than a few hundred
| thousand data points, in which case ggplot is extremely
| slow, if it even manages.
| ekianjo wrote:
| Tidy verse has a much nicer syntax than pandas and the
| like
| LostMyLogin wrote:
| Not to be confused with The Book of R:
| https://www.amazon.com/Book-First-Course-Programming-Statist...
| thangalin wrote:
| 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://keenwrite.com/
|
| [2]: https://youtu.be/XSbTF3E5p7Q?list=PLB-
| WIt1cZYLm1MMx2FBG9KWzP...
| juujian wrote:
| Last time I was working on something complex, I was able to
| knit from Rmd to md, and then use my usual pandoc defaults,
| which was quite neat. Big recommendation on that workflow.
| haberman wrote:
| There is also Quarto, which I have had a good experience with:
| https://quarto.org/
| countrymile wrote:
| 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?
| malshe wrote:
| Yes, that's correct. Quarto is language agnostic and Posit
| has chosen that route over just being an R shop.
| shepherdjerred wrote:
| I'm more excited about https://typst.app/
| Onawa wrote:
| Quarto can output to Typst (as well as many other outputs
| simultaneously, e.g. .docx, HTML, PDF, PPT, etc) for it's
| typesetting capabilities. https://quarto.org/docs/output-
| formats/typst.html
| kingkongjaffa wrote:
| 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?
| jmalicki wrote:
| Do you dislike rpy? I've found it to be pretty easy to use.
| bachmeier wrote:
| Not sure what you mean by "python backend". If you mean calling
| R from Python, rpy2 mentioned in the other comment works well.
| If you mean the other direction, RStudio has this all built in.
| This is probably the best place to start:
| https://rstudio.github.io/reticulate/articles/calling_python...
| jjr8 wrote:
| 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.
| huijzer wrote:
| CSV is generally the answer. Unless you need superb performance
| which generally is not the case.
| hughess wrote:
| This is great - I used to use R all the time when I worked in
| finance and wish I had this resource back then!
|
| R and RMarkdown were big inspirations for what we're building at
| evidence.dev now, so very grateful to everyone involved in the R
| community
| brcmthrowaway wrote:
| Does R support LLM?
| countrymile wrote:
| There are packages for that. Copilot is well integrated in
| Rstudio.
| hadley wrote:
| I've wrapped a bunch of providers with ellmer:
| https://ellmer.tidyverse.org
| vharuck wrote:
| I also like this fun though dated handbook, full of gotchas
| common among new R programmers:
|
| https://www.burns-stat.com/pages/Tutor/R_inferno.pdf
| uptownfunk wrote:
| 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.
___________________________________________________________________
(page generated 2025-04-10 23:00 UTC)