-
Notifications
You must be signed in to change notification settings - Fork 230
/
intro.Rmd
60 lines (45 loc) · 2.71 KB
/
intro.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Introduction {#introduction .r4ds-section}
```{r include=FALSE,cache=FALSE,purl=FALSE}
# don't cache anything on this page
knitr::opts_chunk$set(cache = FALSE)
```
## How this book is organized {-}
The book is divided into sections in with the same numbers and titles as those in *R for Data Science*.
Not all sections have exercises.
Those sections without exercises have placeholder text indicating that there are no exercises.
The text for each exercise is followed by the solution.
Like *R for Data Science*, packages used in each chapter are loaded in a code chunk at the start of the chapter in a section titled "Prerequisites".
If exercises depend on code in a section of *R for Data Science* it is either provided before the exercises or within the exercise solution.
If a package is used infrequently in solutions it may not be loaded, and functions using it will be called using the package name followed by two colons, as in `dplyr::mutate()` (see the *R for Data Science* [Introduction](https://r4ds.had.co.nz/introduction.html#running-r-code)).
The double colon may also be used to be explicit about the package from which a function comes.
## Prerequisites {-}
This book is a complement to, not a substitute of, [R for Data Science]().
It only provides the exercise solutions for it.
See the [R for Data Science](https://r4ds.had.co.nz/introduction.html#prerequisites) prerequisites.
Additional, the solutions use several packages that are not used in *R4DS*.
You can install all packages required to run the code in this book with the following line of code.
```{r eval=FALSE}
devtools::install_github("jrnold/r4ds-exercise-solutions")
```
## Bugs/Contributing {-}
If you find any typos, errors in the solutions, have an alternative solution,
or think the solution could be improved, I would love your contributions.
The best way to contribute is through GitHub.
Please open an issue at <https://github.com/jrnold/r4ds-exercise-solutions/issues> or a pull request at
<https://github.com/jrnold/r4ds-exercise-solutions/pulls>.
## Colophon {-}
```{r include=FALSE, purl = FALSE}
r_head <- git2r::repository_head()
r_branch <- r_head$name
r_sha <- git2r::sha(r_head)
r_sha_short <- stringr::str_sub(r_sha, 1, 7)
github_full_url <- stringr::str_c(SOURCE_URL, "tree", r_sha, sep = "/")
```
HTML and PDF versions of this book are available at <`r PUB_URL`>.
The book is powered by [bookdown](https://bookdown.org/home) which makes it easy to turn R markdown files into HTML, PDF, and EPUB.
The source of this book is available on GitHub at <`r SOURCE_URL`>.
This book was built from commit [`r r_sha_short`](`r github_full_url`).
This book was built with these R packages.
```{r colonophon}
devtools::session_info("r4ds.exercise.solutions")
```