Skip to contents

Mathematical expression

Usage

mathexpr(expr)

Arguments

expr

User defined mathematial expression. he expression will be processed by muparser library which offers a wide variety of operators. Visit muparser website (https://beltoforion.de/en/muparser/features.php) to see full list of available operators.

Value

a Distribution object for simulator

Examples

transitions <- list("S->I"=mathexpr("beta*S/N"))
# definition for parameters in the expression required
params <- c(N = 1000, beta = 0.3)