Learn R Programming

denim (version 1.2.1)

mathexpr: Mathematical expression

Description

Mathematical expression

Usage

mathexpr(expr)

Value

a Distribution object for simulator

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.

Examples

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

Run the code above in your browser using DataLab