VSI_Analysis/vsi.Rmd

114 lines
2.4 KiB
Plaintext
Raw Normal View History

---
output:
pdf_document:
includes:
in_header: ./components/styles.tex
number_sections: TRUE
latex_engine: xelatex
fig_caption: yes
fig_width: 4
fig_height: 3
keep_tex: TRUE
header-includes:
- \usepackage{titling}
- \setlength{\droptitle}{5em}
papersize: a4paper
fontsize: 11pt
mainfont: Arial
geometry: margin = 3cm
subparagraph: TRUE
graphics: yes
csl: ./components/apa.csl
link-citations: yes
params:
mainFile: ""
intFile: ""
version: "0.2"
---
```{r setup, include = FALSE, error=TRUE}
library(knitr)
#library(kableExtra)
knitr::opts_chunk$set(echo = TRUE, results = "hide", message = TRUE, dev = "cairo_pdf", warning = TRUE)
knitr::opts_chunk$set(fig.pos = 'H')
options(knitr.table.format = "latex", knitr.kable.NA = "")
Sys.setlocale("LC_ALL","English")
```
```{r setup2, include = FALSE,, error=T, warning=T, message=T}
library(here)
library(foreign)
library(dplyr)
library(psych)
library(ggplot2)
library(lubridate)
library(wesanderson)
#library(colortools) # adjacent works
library(ggthemes) # theme_tufte works
library(varhandle) # coercing factor to numeric variables
library(naniar) # for replacing values with missings
# for tables
library(knitr)
#New packages:
library(cowplot)
library(tibble)
```
```{r theme, include=FALSE, error=TRUE}
ESSred <- rgb(.91, .20, .32)
ESSgreen <- rgb(.14, .62, .51)
ESSblue <- rgb(0, .25, .48)
ESSColors <- unique(c(adjacent(ESSred, plot = F), square(ESSred, plot = F)))
ESSColors <- c(ESSColors, ESSgreen, ESSblue)
# pizza(ESSColors)
themeESS <- theme_tufte(base_size = 9, base_family = "Calibri") +
theme(axis.title = element_text(size = 9, face = "plain"),
axis.text = element_text(size = 9),
axis.line.x = element_line(),
plot.title = element_blank(),
legend.title = element_blank(),
legend.text = element_text(size = 9),
strip.text = element_text(size = 9, face = "bold"),
legend.position = "none",
legend.direction = "horizontal",
legend.box = "vertical",
legend.spacing = unit(0, "line"),
legend.key.size = unit(.75, "line"))
linebreak <- "\\hspace{\\textwidth}"
```
\newpage
\FloatBarrier
\pagenumbering{gobble}
```{r child = "components/Titlepage.Rmd", error=T, warning=T, message=T}
```
\pagenumbering{arabic}
\setcounter{tocdepth}{2}
\tableofcontents
\listoftables
\listoffigures
# Introduction {-}