{"id":13665760,"url":"https://github.com/hadley/r4ds","last_synced_at":"2025-05-11T03:44:54.091Z","repository":{"id":35528888,"uuid":"39799721","full_name":"hadley/r4ds","owner":"hadley","description":"R for data science: a book","archived":false,"fork":false,"pushed_at":"2025-04-29T12:28:16.000Z","size":78203,"stargazers_count":4767,"open_issues_count":22,"forks_count":4293,"subscribers_count":214,"default_branch":"main","last_synced_at":"2025-05-11T03:44:48.531Z","etag":null,"topics":["book","bookdown","data-science","r"],"latest_commit_sha":null,"homepage":"https://r4ds.hadley.nz/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hadley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-07-27T21:52:44.000Z","updated_at":"2025-05-10T05:19:56.000Z","dependencies_parsed_at":"2023-02-13T00:00:38.394Z","dependency_job_id":"98323c17-19ee-4916-b490-d0690e8d9e6e","html_url":"https://github.com/hadley/r4ds","commit_stats":{"total_commits":2034,"total_committers":300,"mean_commits":6.78,"dds":0.5,"last_synced_commit":"12c6affd2fe489e435bb28fb114bc328e4dfd728"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadley%2Fr4ds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadley%2Fr4ds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadley%2Fr4ds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadley%2Fr4ds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadley","download_url":"https://codeload.github.com/hadley/r4ds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514553,"owners_count":21920334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["book","bookdown","data-science","r"],"created_at":"2024-08-02T06:00:50.129Z","updated_at":"2025-05-11T03:44:54.077Z","avatar_url":"https://github.com/hadley.png","language":"R","readme":"# R for Data Science\n\n\u003c!-- badges: start --\u003e\n\n[![Render and deploy Book to Netlify](https://github.com/hadley/r4ds/actions/workflows/build_book.yaml/badge.svg)](https://github.com/hadley/r4ds/actions/workflows/build_book.yaml)\n\n\u003c!-- badges: end --\u003e\n\nThis repository contains the source of [R for Data Science](http://r4ds.hadley.nz) book.\nThe book is built using [Quarto](https://quarto.org/).\n\n## Images\n\n### Omnigraffle drawings\n\n-   Font: 12pt Guardian Sans Condensed / Ubuntu mono\n\n-   Export as 300 dpi png.\n\n-   Website font is 18 px = 13.5 pt, so scale dpi to match font sizes: 270 = 300 \\* 12 / 13.5.\n    (I also verified this empirically by screenshotting.)\n\n    ``` r\n    #| echo: FALSE\n    #| out.width: NULL\n    knitr::include_graphics(\"diagrams/transform.png\", dpi = 270)\n    ```\n\n### Screenshots\n\n-   Make sure you're using a light theme.\n    For small interface elements (eg. toolbars), zoom in twice.\n\n-   Screenshot with Cmd + Shift + 4.\n\n-   Don't need to set dpi:\n\n    ``` r\n    #| echo: FALSE\n    #| out.width: NULL\n    knitr::include_graphics(\"screenshots/rstudio-wg.png\")\n    ```\n\n### O'Reilly\n\nTo generate book for O'Reilly, build the book then:\n\n```{r}\n# pak::pak(\"hadley/htmlbook\")\nhtmlbook::convert_book()\n\nhtml \u003c- list.files(\"oreilly\", pattern = \"[.]html$\", full.names = TRUE)\nfile.copy(html, \"../r-for-data-science-2e/\", overwrite = TRUE)\n\npngs \u003c- list.files(\"oreilly\", pattern = \"[.]png$\", full.names = TRUE, recursive = TRUE)\ndest \u003c- gsub(\"oreilly\", \"../r-for-data-science-2e/\", pngs)\nfs::dir_create(unique(dirname(dest)))\nfile.copy(pngs, dest, overwrite = TRUE)\n```\n\nThen commit and push to atlas.\n\n## Code of Conduct\n\nPlease note that r4ds uses a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).\nBy contributing to this book, you agree to abide by its terms.\n","funding_links":[],"categories":["R","[R](#r)","A01_机器学习教程"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadley%2Fr4ds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadley%2Fr4ds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadley%2Fr4ds/lists"}