Skip to content

hadley/r4ds

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
November 18, 2022 12:58
February 13, 2023 02:22
February 7, 2023 15:41
April 10, 2023 00:13
February 14, 2023 07:37
July 13, 2023 11:52
July 27, 2015 16:52
July 13, 2023 11:52
July 11, 2023 14:42
August 24, 2023 09:26
April 10, 2023 17:27
July 13, 2023 11:52
July 13, 2023 11:52
July 13, 2023 11:52
November 21, 2016 08:28
August 15, 2023 08:51
July 13, 2023 11:52
July 13, 2023 11:52
August 23, 2023 08:18
July 13, 2023 11:52
July 13, 2023 11:52
November 21, 2022 09:41
May 18, 2023 15:01
July 13, 2023 11:52
July 13, 2023 11:52

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.