-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy path16_appendix.Rmd
43 lines (33 loc) · 1.35 KB
/
16_appendix.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
# Appendix {-}
```{r message=FALSE, warning=FALSE, echo = FALSE}
library(tidyverse)
library(knitr)
# all used packages:
system("grep '^library(' *Rmd > library_calls.txt")
used_packages_orig = read_table("library_calls.txt", col_names = "packages")
used_packages = used_packages_orig %>%
separate(packages, into = c(NA, "packages"), sep = ":") %>%
separate(packages, into = c("packages", "comment"), sep = "#") %>%
mutate(packages = str_trim(packages)) %>%
distinct(packages) %>%
bind_rows(tibble(packages = c("tibble", "tidyr", "purrr", "stringr", "bookdown", "rmarkdown"))) %>%
mutate(packages = str_remove(packages, "library\\(") %>% str_remove("\\)") %>%
fct_relevel("tidyverse",
"ggplot2",
"tibble",
"tidyr",
"readr",
"purrr",
"dplyr",
"stringr",
"forcats",
"finalfit")) %>%
arrange(packages) %>%
pull(packages)
```
This book was written in **bookdown**, which is an R package built on top of R Markdown (@xie2016).
The main packages used in this book were: **`r combine_words(used_packages)`**.
R and package versions, `sessionInfo()`:
```{r, echo = FALSE}
xfun::session_info(used_packages, dependencies = FALSE)
```