Welcome to the Big Book of R repository! This repository hosts a collection of nearly 400 R programming books, most of which are freely available. The project is open to contributions of both free and paid books.
To work with this repository, you need to have some tools and libraries installed on your system:
library(dplyr)
library(tidyr)
library(stringr)
library(googlesheets4)
library(readr)
_quarto.yml
: The primary configuration file that manages the rendering of books and calls all .qmd
files.chapters/
: Directory where individual .qmd
files are stored after fetching data from the Google Sheets.scripts/
:
fetch_books.R
: Script to fetch book data from Google Sheets, create .qmd
files in the chapters
directory, and generate the chapter_list.txt
.chapter_list.txt
: Text file containing the list of .qmd
files with their paths, generated by fetch_books.R
.Clone the repository to your local machine. Use the git command to clone the repository:
git clone [repository-url]
Install all the prerequisites mentioned above. Ensure that all necessary tools and libraries, as specified in the project documentation, are installed on your system.
Ensure R and necessary libraries are installed. Use the following commands in your R console to install the required R packages if not already installed:
install.packages("dplyr")
install.packages("tidyr")
install.packages("stringr")
install.packages("googlesheets4")
install.packages("readr")
Run the fetch_books.R
script to automate data fetching.
This script automatically populates the chapters
directory and generates the chapter_list.txt
file. It is designed to facilitate the addition of new book entries without needing manual updates to the project structure:
Preview the book locally.
Immediately after running the fetch_books.R
, preview the book using:
quarto preview
This step ensures that the newly fetched content renders correctly without errors.
_quarto.yml
file:
chapters
directory and the existing chapter_list.txt
file.fetch_books.R
:
Fetch the latest data to reflect the new chapter entries and generate updated .qmd
files._quarto.yml
:
Incorporate changes from the new chapter_list.txt
into _quarto.yml
to align with the new chapter structure.quarto preview
to verify that all updates are rendered correctly before committing the changes to the repository.This revised documentation now clearly separates the automated process for adding new book entries from the manual process required for new chapter entries, including necessary updates to the _quarto.yml
configuration.
To set up GitHub Pages and GitHub Actions, please refer to the detailed guide available here: Setting Up GitHub Pages and Actions
We welcome contributions! If you wish to add books or suggest improvements:
The metadata about the books is stored in a Google Sheet, accessible here.
For any further assistance, please refer to the issue tracker and the README within the repository.