←back to thread

193 points lnyan | 9 comments | | HN request time: 0.918s | source | bottom
1. These335 ◴[] No.42159921[source]
I tried to follow along with the textbook before but really struggled with the practical side - R is just another world in terms of dependency management and organisation/documentation (compared to python at least). The book had me install some version of a library that was since unsupported. So I thought I would be a nerd and do everything in python instead, but there I had other problems installing pymc. After some hours of failing I just gave up. Can anyone speak to the state of the dependencies in this edition? Has everything been updated? Versions listed? Would love to give this another shot
replies(7): >>42159993 #>>42160336 #>>42160856 #>>42161895 #>>42162990 #>>42165079 #>>42169866 #
2. wanderingmind ◴[] No.42159993[source]
For those looking for pymc and the python implementation of this book, here are the jupyter notebooks for the 2022 edition https://github.com/pymc-devs/pymc-resources/tree/main/Rethin...
3. bigfudge ◴[] No.42160336[source]
There is a version of everything in the book reimplemented in rStan, which is a fairly easy to install and well supported R package that wraps Stan. I don’t have the link but should be easy to google.

I think it’s a magnificent book - definitely repays the time to work though in detail.

4. haberman ◴[] No.42160856[source]
When I was working on the exercises, I found the Rocker project (https://rocker-project.org/) + DevContainers in VSCode to be a winning combination.

Combined with OrbStack (for Docker on MacOS) and Quarto (which is a nice Markdown-based alternative to Jupyter) I would go so far as to call the experience pleasant.

I don't remember running into version-related problems. Maybe I didn't make it as far in the book as you.

5. laichzeit0 ◴[] No.42161895[source]
I happened to install everything two days ago. R version 4.3.3 (I use RSwitch to switch between R versions on Mac). You should use REnv for dependency management. There were no problems installing the rethinking package, the Cmdrstan package just needed to be installed with devtools instead of install.packages.

I’m mostly a Python guy, and didn’t find it particularly hard to get this going. Although I’m always left scratching my head when using RStudio/Renv/R. It’s such a horrible environment (always hanging, crashing, slow, the tooling sucks ass). I refuse to believe that I’m the only person who has RStudio hang and require a restart or get stuck on some uninterruptible process and requires forcing killing it at least once a day.

replies(1): >>42162252 #
6. kuhewa ◴[] No.42162252[source]
> require a restart or get stuck on some uninterruptible process and requires forcing killing it at least once a day.

Yes, I think I've been trained by crashes to subconsciously limit interactions with the RStudio GUI while something is running, e.g resizing a window seems to be surefire way to cause a crash.

7. fithisux ◴[] No.42162990[source]
There is a Julia version of the exact same material and is clean.
8. UniverseHacker ◴[] No.42165079[source]
I recommend using biocmanager to install all R packages- it is very good at automatically resolving dependency issues. The built in R stuff just isn’t great… but there are a few extremely good 3rd party systems

Ultimately there is no good solution- really in any language- that I know of for using old unmaintained packages on a modern version of the language.

9. kussenverboten ◴[] No.42169866[source]
I think there exist github repos where the code in the book has been translated to python.