-
Notifications
You must be signed in to change notification settings - Fork 2
/
91-colophon.qmd
70 lines (55 loc) · 2.16 KB
/
91-colophon.qmd
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
61
62
63
64
65
66
67
68
69
```{r include=FALSE}
source("R/common.R")
```
# Colophon {.unnumbered}
This book was produced using [`r R.version.string`](https://cran.r-project.org/). Fundamental to this was the framework for reproducible documents provided by Yihui Xie's [knitr package](https://cran.r-project.org/web/packages/knitr/index.html).
[Quarto](https://quarto.org/) was used to compile and render the book in HTML and PDF formats.
[** Don't really need all this**]
```{r}
#| label: quarto-info
#| echo: false
#| comment: ""
# this from: https://raw.githubusercontent.com/aml4td/website/main/index.qmd
quarto_info <- function(){
file_out <- tempfile("temp-quarto.txt")
system2(command = "quarto", args = "check", stderr = file_out)
res <- readLines(file_out)
res <- purrr::map_chr(res, cli::ansi_strip)
rms <- c("(|)", "(/)", "(\\)", "(/)", "(-)", "/Users", "Path:", "Install with")
for (pat in rms) {
res <- res[!grepl(pat, res, fixed = TRUE)]
}
res <- res[res != ""]
invisible(res)
}
quarto_res <- quarto_info()
req_quarto_version <- "1.4.510" # in future, use numeric_version()
# if (!any(grepl(req_quarto_version, quarto_res))) {
# cli::cli_abort("Version {req_quarto_version} of Quarto is required.
# See {.url https://quarto.org/docs/download/}")
# }
cat(quarto_res, sep = "\n")
```
## Package versions
The principal R package versions used in examples and illustrations are listed below.
These were captured via `sessioninfo:::package_info()`
from all `library()` commands in the text, and scripts which also updated
the references to packages.
At the time of writing, most of these were current on [CRAN](http://cran.us.r-project.org/)
repositories but some development versions are indicated as "local" in the `source` column.
```{r}
#| label: package-info
#| echo: false
#| results: asis
library(dplyr)
packages <- read_pkgs()
pkg_info <- sessioninfo:::package_info(packages, dependencies = FALSE)
# clean up unwanted
pkg_info$source <- sub(" \\(R.*\\)", "", pkg_info$source)
#pkg_info <- pkg_info[,-2]
pkg_info |>
select(package, ondiskversion, date, source) |>
rename(version = ondiskversion) |>
knitr::kable(row.names = FALSE)
#print(pkg_info)
```