-
Notifications
You must be signed in to change notification settings - Fork 0
/
_common.R
46 lines (38 loc) · 901 Bytes
/
_common.R
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
# install.packages("formatR")
set.seed(2023)
library(ggplot2); ggplot2::theme_set(ggplot2::theme_minimal(6))
# Chunks options for html output
if (!knitr::is_latex_output()) {
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
fig.retina = 2,
fig.width = 6,
fig.asp = 2/3,
fig.show = "hold"
# tidy = TRUE,
# tidy.opts=list(width.cutoff=60)
)
}
# Chunk options only for pdf output
if (knitr::is_latex_output()) {
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
fig.show = "hold"
# tidy = TRUE,
# tidy.opts=list(width.cutoff=60)
)
}
options(
dplyr.print_min = 6,
dplyr.print_max = 6,
pillar.max_footer_lines = 2,
pillar.min_chars = 15,
stringr.view_n = 6,
# Temporarily deactivate cli output for quarto
cli.num_colors = 0,
cli.hyperlink = FALSE,
pillar.bold = TRUE,
width = 77 # 80 - 3 for #> comment
)