For R programming basics see Appendix A of Regression and Other Stories. If you want to learn more, see our recommendations for R programming and visualization with R.
datafolders (.csv or .txt) in github, and .html -files point to knitted notebooks.
datasubfolder for easy experimenting. For completeness and reproducibility, the data subfolders have also the raw data and
*_setup.Rfile showing how the data pre-processing has been done (to do the exercises and follow along with the examples, you don’t need to worry about the setup code).
For easy access to data sets, there is an R package
rosdata. You can install it with a command
remotes::install_github("avehtari/ROS-Examples",subdir = "rpackage"). Then you can access data, for example, as
head(wells). You can get the list of data sets with
rprojrootpackage is used to set the project root directory. The downloaded git repository can be placed anywhere you like and you can rename the ROS-Examples directory if you wish. When running the code, it is sufficient that the working directory is any directory in the ROS-Examples (or renamed). Running
will find the file
.ROS-Examples-root which is in the
ROS-Examples directory, and will set the full path according to that. Then, for example,
wells <- read.csv(root("Arsenic/data","wells.csv"))
wells.csv file, no matter where you have placed or renamed the
ROS-Examples directory. When you switch to another example, there is no need to switch the working directory.
Bill Behrman has revised all the example code to use Tidyverse
Solomon A. Kurz is revising all the example code to use brms and tidyverse
Ravin Kumar, Tomás Capretto, and Osvaldo Martin are porting ROS examples to Python using bambi (BAyesian Model-Building Interface) which has similar formula syntax as rstanarm and brms.
Rob J. Goedman is porting ROS examples to Julia.