-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathECCS.Rmd
54 lines (47 loc) · 1.36 KB
/
ECCS.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
43
44
45
46
47
48
49
50
51
52
53
54
---
title: "Emotional Climate Change Stories (ECCS)"
output: html_document
params:
studies: c(13,14,15,17)
recompute: TRUE
figures: TRUE
classification: FALSE
l: ANG,COM,HOP,NEU
k: 9
---
```{r include=FALSE, echo=FALSE}
library('tidyverse')
library('fields')
library('plotly')
library('htmlwidgets')
library('rstatix')
library('broom')
library('psych')
library("scales")
set.seed(2137) # set seed for replicability
```
```{r include=FALSE, echo=FALSE}
studies = eval(parse(text = params$studies))
infix = paste0("studies-", paste(studies, collapse = "-"))
helpers = file.path("./output/helpers.RData")
derivatives = file.path("./output/derivatives", infix, "derivatives.RData")
```
```{r include=FALSE, echo=FALSE}
if (params$recompute) {
source('./code/01-preproc.R', local = knitr::knit_global())
source('./code/02-helpers.R', local = knitr::knit_global())
source('./code/03-derivatives.R', local = knitr::knit_global())
} else {
load(helpers)
load(derivatives)
}
if (params$figures){
source('./code/04-plots-within-studies.R', local = knitr::knit_global())
source('./code/05-plots-between-studies.R', local = knitr::knit_global())
source('./code/06-stats.R', local = knitr::knit_global())
source('./code/07-ratings.R', local = knitr::knit_global())
}
if (params$classification){
source('./code/08-classification.R', local = knitr::knit_global())
}
```