Skip to content

Commit b10650e

Browse files
committed
Add data for lecture 6
1 parent 20c9aa3 commit b10650e

File tree

4 files changed

+30509
-0
lines changed

4 files changed

+30509
-0
lines changed

Exercise_padlet.Rmd

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: "Lecture 3 - Padlet exercise"
3+
output: html_notebook
4+
---
5+
# Preparing workspace
6+
```{r}
7+
library(tidyverse)
8+
```
9+
##Loading data
10+
```{r}
11+
corr_data <- as_tibble(read.csv("data/correlation_experiment.csv"))
12+
corr_data
13+
```
14+
15+
# Padlet Plot
16+
```{r}
17+
TH = 0.05
18+
corr_data |>
19+
mutate(significance = ifelse(pvalue<=TH*1e-3, "***", ifelse(pvalue<=TH*1e-2,"**", ifelse(pvalue<=TH*1e-1,"*","")))) |>
20+
ggplot(aes(x=variable,y=correlation,color=category, label=significance)) +
21+
geom_col(aes(fill=category),alpha=0.2) +
22+
geom_text(nudge_y=0.05)
23+
```
24+
25+

Exercise_padlet.nb.html

Lines changed: 1876 additions & 0 deletions
Large diffs are not rendered by default.

data/correlation_experiment.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
variable,category,correlation,pvalue
2+
A,F1,0.9,0.000000001
3+
B,F2,0.7,0.0000001
4+
C,F1,0.6,0.0001
5+
D,F3,0.22,0.15
6+
E,F3,0.2,0.12
7+

0 commit comments

Comments
 (0)