Contribute cheatsheets for the Stan ecosystem in R!

Are there any users of our R packages interested in working on cheatsheets like the ones RStudio has popularized? We would love to have these available for download on the websites for our R packages and this seems like a nice way for one or many users to contribute to the Stan project without needing to have a deep knowledge of the codebase (at least not the internals).

Here are some examples from RStudio:

https://www.rstudio.com/resources/cheatsheets/

and there’s even a template:

https://www.rstudio.com/resources/cheatsheets/how-to-contribute-a-cheatsheet/

We would be interested in cheatsheets for any of the R packages we maintain, which at the moment include:

  • rstan
  • rstanarm
  • brms
  • bayesplot
  • shinystan
  • loo
  • projpred
  • rstantools

Another possible cheatsheet is one that focuses more broadly on the Stan ecosystem in R, showing how the various packages link up.

6 Likes

I’m still not on Twitter, but if anyone wants to tweet out this request I suppose that would also be a good place to solicit help with this.

The blog auto-tweets. I love that RStudio provided a template! Their cheatsheets are great.

This is a great idea.

For my students, I tried my hand at cheat sheets like RStudio’s, but instead used \LaTeX's beamer package alongside knitr, since I don’t have any artistic talent. My effort landed at something closer to a guide or a simple example, rather than a cheat sheet, but it’s not bad. Attached is a quick effort towards bayesplot.

main.pdf (1.4 MB)

3 Likes

That looks really great.

@jonah : Is the plan to redistribute these somehow on our web site? If so, we’ll need a license that allows redistribution or we’ll have to maintain links.

@roualdes Nice, looks great! Thanks for getting the ball rolling on this.

@Bob_Carpenter Yeah I think we should host them if possible. Should we ask for CC BY from anyone interested in contributing one? That would be sufficient, right?

@roualdes Is this on github somewhere? There are just a few things I would tweak. I can leave comments here but would be happy to make a PR?

@jonah I just created a repository and invited you as a collaborator to it. Feel free to modify as you see fit.

2 Likes

Ok thanks. Is the Rnw file the place to make the edits? The only thing I wanted to change (although I think it affects most of the document) is that you can use as.array with stanreg objects instead of as.matrix in order to keep the chains separate. None of the plots in the cheatsheet actually require directly using the stanfit object inside the stanreg object.

Correct, the Rnw file is the place to make edits. If you don’t get to it in the next few days, I’ll heed your good advice. Using as.array makes sense, I should have thought to try that.

I’m not sure if I’ll get to it in the next few days so, if you have time, go for it! Thanks again for getting this started.

I’m trying to rope @James_Savage to do an rstan one with me. Also, you should get on twitter, @jonah :)

2 Likes

@shoshievass thanks, it would be great to have one for RStan!

1 Like

Of the original list, how many have been completed to date, and are they collected anywhere?

I’m looking at a project creating such an introductory worksheet for using Stan to solve ODEs.