-
Notifications
You must be signed in to change notification settings - Fork 1
/
preamble.qmd
49 lines (45 loc) · 1.23 KB
/
preamble.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
```{r setup, include=FALSE}
# packages
library(RColorBrewer)
library(viridis)
library(scales)
library(readr)
library(ggplot2)
library(cowplot)
library(tidyverse)
library(reshape2)
library(latex2exp)
library(svglite)
library(knitr)
library(kableExtra)
library(formattable)
library(flextable)
library(dplyr)
library(datasets)
library(infer)
library(fontawesome)
options(knitr.kable.NA = '')
# ggplot theme
if (knitr::is_html_output()){
theme_set(theme_gray(base_size = 12))
knitr::opts_chunk$set(echo = TRUE, fig.asp = 0.7143, dev = "svglite", fig.align = "center")
} else {
theme_set(theme_bw(base_size = 10))
knitr::opts_chunk$set(echo = TRUE, fig.asp = 0.7143)
}
theme_ur <- theme(legend.justification = c(1,1), legend.position = c(0.9,0.9), legend.box.margin = margin(c(4, 4, 4, 4), unit = "pt"))
theme_lr <- theme(legend.justification = c(0.9,0), legend.position = c(0.9,0), legend.box.margin = margin(c(4, 4, 4, 4), unit = "pt"))
options(width = 90, knitr.kable.NA = '')
lsz <- 1.0
tsz <- 4
data(iris)
data(trees)
```
::: {.content-hidden when-format="pdf"}
\newcommand{\E}{\mathbf{E}}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\corr}{corr}
\DeclareMathOperator{\sd}{sd}
\newcommand{\se}{\mathsf{se}}
:::