This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Handling dates in epidemics #### | |
library(ggplot2) | |
library(dplyr) | |
library(tidyr) | |
library(purrr) | |
contact_matrix <- matrix(1) | |
demography_vector <- c(10e6) | |
# make initial conditions - order is important |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Examining Epiverse colours for categorical palettes #### | |
library(colorspace) | |
pal_original = c( | |
black = "#071E2D", grey = "#888888", red = "#F04A4C", blue = "#106BA0", | |
green = "#AEC800", teal = "#10BED2", yellow = "#DEFF00", white = "#EBE6E0" | |
) | |
specplot(pal_original) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Dummy internal fn #### | |
f_internal <- function(x) x | |
#### Dummy internal stochastic fn #### | |
# some function of the input (fixed) and draws from a distr (stochastic) | |
# assumes a param beta at position 3 | |
f_internal_stochastic <- function(x) x[[3]] + runif(length(x)) | |
#### Single parameter set and single intervention #### | |
# function operates on some parameters with one run per parameter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(readxl) | |
library(tidygraph) | |
library(scico) | |
library(ggraph) | |
# read data on connections | |
df <- read_excel("contact_matrix.xlsx", | |
sheet = "matrix" |