-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPeer-Review_Results.Rmd
67 lines (49 loc) · 1.56 KB
/
Peer-Review_Results.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
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: "Peer-Review Results"
subtitle: "`r params$group` | BreakOut `r params$BreakoutSession` | Presenter `r params$Presenter`"
output: html_document
params:
group: "Di"
data: "Data_Di_Oral_Presentations_Peer-Review.tsv"
BreakoutSession: 1
Presenter: 1
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r readin, echo=FALSE, comment=FALSE, message = FALSE, warnings = FALSE}
# libraries -------------------------------------------------------------------
library(tidyverse)
library(knitr)
# data -------------------------------------------------------------------------
df <- read.delim(params$data, check.names = F, as.is=T, encoding="UTF-8")
dfs <- df %>%
filter(BreakoutSession == params$BreakoutSession,
Presenter == params$Presenter)
df_tidy <- dfs %>%
select(2:21) %>%
pivot_longer(cols=-(1:2), names_to="question", values_to = "grade") %>%
drop_na()
```
```{r plot, echo=FALSE, fig.height = 8}
colors = c("#ca0020", "#f4a582", "#ffffbf", "#92c5de", "#0571b0")
names(colors) = levels(as.factor(1:5))
df_tidy %>%
count(grade, question) %>%
ggplot(aes(stringr::str_wrap(question, 60), n, fill=as.factor(grade))) +
geom_bar(stat="identity") +
coord_flip() +
theme(axis.title.y = element_blank()) +
labs(fill="Grade") +
scale_fill_manual(values = colors)
```
``` {r table1, echo=FALSE, results = 'asis'}
dfs %>%
select(22) %>%
kable()
```
``` {r table2, echo=FALSE, results = 'asis'}
dfs %>%
select(23) %>%
kable()
```