Skip to content

bogaotory/comoOdeCpp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

comoOdeCpp

License: CC BY-NC 4.0 GitHub release Build Status Maintenance CodeFactor Codecov

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

Install

  • 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:

  • Using devtools package

install.packages("devtools")
library("devtools")
install_github("bogaotory/comoOdeCpp", subdir="comoOdeCpp")

Usage:

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
)

About

Implements CoMo Consortium's COVID-19 transmission model in Rcpp.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 92.6%
  • C++ 7.4%