Fixes to get pdf book building
This commit is contained in:
parent
97b30b7afa
commit
a78edc2e20
|
@ -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")
|
||||
```
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
```{r, include = FALSE}
|
||||
```{r setup, include = FALSE}
|
||||
library(stringr)
|
||||
```
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
---
|
||||
knit: "bookdown::render_book"
|
||||
title: "R for Data Science"
|
||||
output:
|
||||
- bookdown::gitbook
|
||||
---
|
||||
|
||||
# Welcome
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)))
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue