Skip to content

Commit

Permalink
Switch to rstudio/bookdown
Browse files Browse the repository at this point in the history
But don't deploy yet
  • Loading branch information
hadley committed Feb 16, 2016
1 parent cd3915c commit acc8f77
Show file tree
Hide file tree
Showing 69 changed files with 30 additions and 10,650 deletions.
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
.Rproj.user
.Rhistory
_site
cache
temp.Rmd
/*.html
*_cache
*_files
figures
.Rapp.history
_main.Rmd
book_assets
.bundle
vendor
*.md
_main.rds
_main.*
book
32 changes: 13 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
language: R
cache:
packages: true
directores:
- vendor/bundle
directories:
- *_cache
- *_files

addons:
apt:
packages:
- libxml2-dev

# Install ruby gems
before_script:
- rvm use 2.2.0
- bundle install --jobs=3 --retry=3 --deployment
script: _build.sh

script: bundle exec jekyll build

after_success:
- cp -r figures/ _site/figures

deploy:
provider: s3
access_key_id: AKIAJ6PXDYWD72R6HBYA
secret_access_key:
secure: "KB6D4dRFyqABOUBC6q6CTI7WZQ+4kFOSDWNQFAbXJQR4TzR8J6uddAiSZyG8T1/8z+9Lm1VK417Zi0dGm3r3epbSnLClitBetvE11DoByomK+ey+NJ0MdXuXbFCJhX9l+8QDbDRLd/b2MEr36JXNaNQaLf5wdHImVVfcCm5STAIOM42plYMvz4Uhao+VjIKo+0IqiGHQHsNcU4qQXS4jd4FtO/t1xCwa7SgH0wwV2yJmeh8mM7QpmUEpBcZTHDvqZu6BitxtkYQDCh1iuBwhbPlYug/WOtyHmKYgU/c3+C+xW4OLv10OsE+eK6noEzIXQ80sPIyKMpkn+9P+7MnoRU/oZTXmYJOuXE5mvy+CiJ4TzZZxzB/g8HzklRRI4eFBmJ/zTTMmJMwBdbUhCXepARe4gr7pDFKhSTXvBVxljJBrkiGz6W1JeZ9nKzUbuIlWNJ9aaYM2UDMbRef7xyKlKbBNw1+90aTTW8Jo+0Sz3/R7daBTcnr0Bszg4QCaOMoxJJF/Ty/tTHiComAt/kNRqlSiU2g/Ch0jOz5TRV3c29OjQQ/a9ftf5pqlvgStwjjszgHQfRrd4mxGq2E/1gkPGL7ada+TWPAVjCc8HtPGK/36IjSccFB6qGkwTFf3uOBmAC2XVnJJlwG8v20nL5ZZwpCCbQANeQq/ILQsYUmk7RM="
bucket: r4ds.had.co.nz
local-dir: _site
skip_cleanup: true
## Disable deployment until bookdown output is polished
# deploy:
# skip_cleanup: true
# provider: s3
# access_key_id: AKIAJ6PXDYWD72R6HBYA
# secret_access_key:
# secure: "KB6D4dRFyqABOUBC6q6CTI7WZQ+4kFOSDWNQFAbXJQR4TzR8J6uddAiSZyG8T1/8z+9Lm1VK417Zi0dGm3r3epbSnLClitBetvE11DoByomK+ey+NJ0MdXuXbFCJhX9l+8QDbDRLd/b2MEr36JXNaNQaLf5wdHImVVfcCm5STAIOM42plYMvz4Uhao+VjIKo+0IqiGHQHsNcU4qQXS4jd4FtO/t1xCwa7SgH0wwV2yJmeh8mM7QpmUEpBcZTHDvqZu6BitxtkYQDCh1iuBwhbPlYug/WOtyHmKYgU/c3+C+xW4OLv10OsE+eK6noEzIXQ80sPIyKMpkn+9P+7MnoRU/oZTXmYJOuXE5mvy+CiJ4TzZZxzB/g8HzklRRI4eFBmJ/zTTMmJMwBdbUhCXepARe4gr7pDFKhSTXvBVxljJBrkiGz6W1JeZ9nKzUbuIlWNJ9aaYM2UDMbRef7xyKlKbBNw1+90aTTW8Jo+0Sz3/R7daBTcnr0Bszg4QCaOMoxJJF/Ty/tTHiComAt/kNRqlSiU2g/Ch0jOz5TRV3c29OjQQ/a9ftf5pqlvgStwjjszgHQfRrd4mxGq2E/1gkPGL7ada+TWPAVjCc8HtPGK/36IjSccFB6qGkwTFf3uOBmAC2XVnJJlwG8v20nL5ZZwpCCbQANeQq/ILQsYUmk7RM="
# bucket: r4ds.had.co.nz
# local-dir: www
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ Remotes:
hadley/purrr,
hadley/stringr,
hadley/ggplot2,
hadley/bookdown,
hadley/nycflights13,
yihui/knitr
rstudio/bookdown
3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

41 changes: 0 additions & 41 deletions Gemfile.lock

This file was deleted.

3 changes: 3 additions & 0 deletions _bookdown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
new_session: yes

rmd_files: [
"index.rmd",
"understand.Rmd",
"visualize.Rmd",
"transform.Rmd",
Expand All @@ -24,3 +25,5 @@ rmd_files: [
"rmarkdown.Rmd",
"shiny.Rmd",
]

output_dir: "book"
2 changes: 2 additions & 0 deletions _build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env Rscript
bookdown::render_book("index.rmd")
3 changes: 0 additions & 3 deletions _config.yml

This file was deleted.

Binary file removed _includes/.DS_Store
Binary file not shown.
30 changes: 0 additions & 30 deletions _includes/package-nav.html

This file was deleted.

82 changes: 0 additions & 82 deletions _layouts/default.html

This file was deleted.

9 changes: 0 additions & 9 deletions _layouts/post.html

This file was deleted.

24 changes: 0 additions & 24 deletions _plugins/knit.r

This file was deleted.

33 changes: 0 additions & 33 deletions _plugins/rmarkdown.rb

This file was deleted.

3 changes: 1 addition & 2 deletions functions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ title: Expressing yourself in code
```{r, include = FALSE}
source("common.R")
knitr::opts_chunk$set(
cache = TRUE,
fig.path = "figures/functions/"
cache = TRUE
)
library(dplyr)
diamonds <- ggplot2::diamonds
Expand Down
10 changes: 3 additions & 7 deletions index.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ knit: "bookdown::render_book"
output:
bookdown::html_chapters:
lib_dir: "book_assets"
toc_depth: 1
html_names: "chapter"
---

# R for Data Science
# Welcome

This is the book site for __"R for data science"__. This book will teach you how to do data science with R: You'll learn how to get your data into R, get it into the most useful structure, transform it, visualise it and model it. In this book, you will find a practicum of skills for data science. Just as a chemist learns how to clean test tubes and stock a lab, you'll learn how to clean data and draw plots---and many other things besides. These are the skills that allow data science to happen, and here you will find the best practices for doing each of these things with R. You'll learn how to use the grammar of graphics, literate programming, and reproducible research to save time. You'll also learn how to manage cognitive resources to facilitate discoveries when wrangling, visualizing, and exploring data. (__R for Data Science__ was formally called __Data Science with R__ in __Hands-On Programming with R__)

To be published by O'Reilly in July 2016.

<img src="cover.png" width="250" height="328" alt="Cover image" />

## Table of contents {#toc}

<ul class="toc">
{% include package-nav.html %}
</ul>
5 changes: 2 additions & 3 deletions r4ds.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ LaTeX: XeLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
BuildType: Custom
CustomScriptPath: _build.sh
2 changes: 1 addition & 1 deletion relational-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ library(nycflights13)
library(ggplot2)
source("common.R")
options(dplyr.print_min = 6, dplyr.print_max = 6)
knitr::opts_chunk$set(fig.path = "figures/", cache = TRUE)
knitr::opts_chunk$set(cache = TRUE)
```

It's rare that a data analysis involves only a single table of data. Typically you have many tables of data, and you must combine them to answer the questions that you're interested in. Collectively, multiple tables of data are called __relational data__ because it is the relations, not just the individual datasets, that are particularly important.
Expand Down
Binary file removed toc.rds
Binary file not shown.
29 changes: 0 additions & 29 deletions toc.yaml

This file was deleted.

Loading

0 comments on commit acc8f77

Please sign in to comment.