Skip to content

Commit

Permalink
Fixes to get pdf book building
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Apr 1, 2016
1 parent 97b30b7 commit a78edc2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data-structures.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ As you start to write more functions, and as you want your functions to work wit

The most important family of objects in R are __vectors__. Vectors are broken down into __atomic__ vectors, and __lists__. There are six types of atomic vector, but only four are in common use: logical, integer, double, and character. The chief difference between atomic vectors and lists is that atomic atomic vectors are homogeneous (every element is the same type) and lists are heterogeneous (each element can be a different type).

```{r, echo = FALSE, out.width = NA, out.height = NA}
```{r, echo = FALSE}
knitr::include_graphics("diagrams/data-structures-overview.png")
```

Expand Down
2 changes: 1 addition & 1 deletion functions.Rmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```{r, include = FALSE}
```{r setup, include = FALSE}
library(stringr)
```

Expand Down
2 changes: 0 additions & 2 deletions index.rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
knit: "bookdown::render_book"
title: "R for Data Science"
output:
- bookdown::gitbook
---

# Welcome
Expand Down
2 changes: 1 addition & 1 deletion model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ggplot(data = heights, mapping = aes(x = height, y = income)) +

`lm()` treats the variable(s) on the right-hand side of the formula as _explanatory variables_ that partially determine the value of the variable on the left-hand side of the formula, which is known as the _response variable_. In other words, it acts as if the _response variable_ is determined by a function of the _explanatory variables_. It then spots the linear function that best fits the data.

Linear models are straightforward to interpret. Incomes have a baseline mean of $`r coef(h)[1]`. Each one inch increase of height above zero is associated with an increase of $`r coef(h)[2]` in income.
Linear models are straightforward to interpret. Incomes have a baseline mean of $`r coef(h)[1]`$. Each one inch increase of height above zero is associated with an increase of $`r coef(h)[2]`$ in income.

```{r}
summary(h)
Expand Down
2 changes: 1 addition & 1 deletion variation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Rectangular data provides a clear record of variation, but that doesn't mean it
mat <- as.data.frame(matrix(morley$Speed + 299000, ncol = 10))
knitr::kable(mat, caption = "*The speed of light is* the *universal constant, but variation obscures its value, here demonstrated by Albert Michelson in 1879. Michelson measured the speed of light 100 times and observed 30 different values (in km/sec).*", col.names = c("\\s", "\\s", "\\s", "\\s", "\\s", "\\s", "\\s", "\\s", "\\s", "\\s"))
knitr::kable(mat, caption = "*The speed of light is* the *universal constant, but variation obscures its value, here demonstrated by Albert Michelson in 1879. Michelson measured the speed of light 100 times and observed 30 different values (in km/sec).*", col.names = rep("", ncol(mat)))
```


Expand Down

0 comments on commit a78edc2

Please sign in to comment.