-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffd_plots.R
52 lines (35 loc) · 1.42 KB
/
ffd_plots.R
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
##### full factorial design for 4 graph models
library(tidyverse)
library(stringr)
library(knitr)
library(kableExtra)
library(RColorBrewer)
rm(list = ls())
source("plot_funs.R")
full_mean_df <- read_csv("data/comp_mean_df.csv")
full_var_df <- read_csv("data/comp_var_df.csv")
graph_names <- expand_grid(c("ABCD ", "WS "), c("const", "var")) %>%
pmap_dfr(~ tibble(agr = str_c(...))) %>%
unlist
graph_names <- graph_names %>% set_names(
graph_names %>% map_chr(function(graph_name) {
splitted <- (graph_name %>% str_split(" "))[[1]]
str_c(tolower(splitted[1]), "_", splitted[2])
})
)
###################################################################
full_mean_df %>%
plot_comparison("_I_70", "Średnia liczba aktywnych przypadków po 70 dniach", graph_names)
ggsave("figures/I70_mean.eps", device = "eps")
full_mean_df %>%
plot_comparison("_S_70", "Średnia liczba niezarażonych po 70 dniach", graph_names)
ggsave("figures/S70_mean.eps", device = "eps")
full_mean_df %>%
plot_comparison("_R_70", "Średnia liczba wyleczonych po 70 dniach", graph_names)
ggsave("figures/R70_mean.eps", device = "eps")
full_mean_df %>%
plot_comparison("_D_70", "Średnia liczba zmarłych po 70 dniach", graph_names)
ggsave("figures/D70_mean.eps", device = "eps")
full_var_df %>%
plot_comparison("_S_70", "Wariancja liczby aktywnych przypadków po 70 dniach", graph_names)
ggsave("figures/S70_var.eps", device = "eps")