This package implements CoMo Consortium's COVID-19 transmission model in Rcpp. comoOdeCpp is designed to work with CoMo COVID-19 app
by Ricardo Aguas (R version), Bo Gao (Rcpp version), and Sompob Saralamba (early Rcpp version)
Bo Gao currently maintains this repository
-
GUI option:
-
Download the latest release from https://github.com/bogaotory/comoOdeCpp/releases, e.g.
comoOdeCpp_13.13.1.tar.gz
-
RStudio >> Tools >> Install Packages >> Install from: Package Archive File (.tar.gz) >> Package archive: Browse to select
comoOdeCpp_13.13.1.tar.gz
-
-
R commandline option:
-
Download the latest release from https://github.com/bogaotory/comoOdeCpp/releases, e.g.
comoOdeCpp_13.13.1.tar.gz
-
install.packages("path_to_download/comoOdeCpp_13.13.1.tar.gz", repos = NULL, type="source")
-
-
Using
devtools
package
install.packages("devtools")
library("devtools")
install_github("bogaotory/comoOdeCpp", subdir="comoOdeCpp")
Add library("comoOdeCpp")
at the beginning of your script, or require("comoOdeCpp")
if you are writing a package
Examples use with ode function:
covidOdeCpp_reset()
out0 <- ode(y = Y, times = times, func = covidOdeCpp, parms = parameters,
input=vectors0, A=A,
contact_home=contact_home, contact_school=contact_school,
contact_work=contact_work, contact_other=contact_other,
popbirth_col2=popbirth[,2], popstruc_col2=popstruc[,2],
ageing=ageing,
ifr_col2=ifr[,2], ihr_col2=ihr[,2], mort_col=mort,
age_group_vectors = age_group_vectors
)
covidOdeCpp_reset()
out0 <- ode(y = Y, times = times, method = "euler", hini = 0.05, func = covidOdeCpp, parms = parameters,
input=vectors0, A=A,
contact_home=contact_home, contact_school=contact_school,
contact_work=contact_work, contact_other=contact_other,
popbirth_col2=popbirth[,2], popstruc_col2=popstruc[,2],
ageing=ageing,
ifr_col2=ifr[,2], ihr_col2=ihr[,2], mort_col=mort,
age_group_vectors = age_group_vectors
)