Skip to content

hadley/r4ds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

065cb32 · Mar 13, 2025
Feb 18, 2025
Nov 10, 2023
Feb 13, 2023
May 25, 2023
Feb 7, 2023
May 25, 2023
Apr 10, 2023
Oct 5, 2020
Feb 14, 2023
Oct 5, 2020
May 26, 2023
Jan 12, 2025
Jul 27, 2015
Feb 7, 2023
Jul 13, 2023
Jul 11, 2023
Nov 10, 2023
Jul 16, 2023
Jul 13, 2023
Jun 1, 2024
May 13, 2022
Aug 24, 2018
May 26, 2023
Apr 10, 2023
Jan 12, 2025
May 28, 2024
Sep 2, 2024
Oct 30, 2023
Jan 12, 2025
Mar 13, 2024
Sep 27, 2024
Nov 21, 2016
Jan 12, 2025
Aug 15, 2023
Mar 13, 2025
May 4, 2024
Nov 20, 2015
Jan 12, 2025
Jan 12, 2025
May 28, 2024
Jul 14, 2024
Nov 10, 2023
Jan 12, 2025
Nov 18, 2022
May 13, 2022
May 28, 2023
Jan 12, 2025
Jan 28, 2024
Jan 29, 2024
Nov 21, 2022
May 18, 2023
May 31, 2024
Mar 2, 2024
Jan 12, 2025
Jan 12, 2025
Oct 26, 2021
Jan 12, 2025
Jul 13, 2023
Jul 16, 2023
May 26, 2023
Jul 13, 2023
Jul 13, 2023
Jan 12, 2025
Jul 13, 2023

Repository files navigation

R for Data Science

Render and deploy Book to Netlify

This repository contains the source of R for Data Science book. The book is built using Quarto.

Images

Omnigraffle drawings

  • Font: 12pt Guardian Sans Condensed / Ubuntu mono

  • Export as 300 dpi png.

  • Website font is 18 px = 13.5 pt, so scale dpi to match font sizes: 270 = 300 * 12 / 13.5. (I also verified this empirically by screenshotting.)

    #| echo: FALSE
    #| out.width: NULL
    knitr::include_graphics("diagrams/transform.png", dpi = 270)

Screenshots

  • Make sure you're using a light theme. For small interface elements (eg. toolbars), zoom in twice.

  • Screenshot with Cmd + Shift + 4.

  • Don't need to set dpi:

    #| echo: FALSE
    #| out.width: NULL
    knitr::include_graphics("screenshots/rstudio-wg.png")

O'Reilly

To generate book for O'Reilly, build the book then:

# pak::pak("hadley/htmlbook")
htmlbook::convert_book()

html <- list.files("oreilly", pattern = "[.]html$", full.names = TRUE)
file.copy(html, "../r-for-data-science-2e/", overwrite = TRUE)

pngs <- list.files("oreilly", pattern = "[.]png$", full.names = TRUE, recursive = TRUE)
dest <- gsub("oreilly", "../r-for-data-science-2e/", pngs)
fs::dir_create(unique(dirname(dest)))
file.copy(pngs, dest, overwrite = TRUE)

Then commit and push to atlas.

Code of Conduct

Please note that r4ds uses a Contributor Code of Conduct. By contributing to this book, you agree to abide by its terms.