RGillespie: R6 class implementing the Gillespie method in R This is a...

RGillespieR Documentation

R6 class implementing the Gillespie method in R This is a subclass of Simulator, using an R implementation of the Gillespie method to simulate a compartmental model.

Description

R6 class implementing the Gillespie method in R

This is a subclass of Simulator, using an R implementation of the Gillespie method to simulate a compartmental model.

R6 class implementing the Gillespie method in R

This is a subclass of Simulator, using an R implementation of the Gillespie method to simulate a compartmental model.

Super class

REpiSim::Simulator -> RGillespie

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage
RGillespie$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# an SIR model
SIR = Compartmental$new(S, I, R, title="SIR")
SIR$transition(S->I ~ beta*S*I/N, N=S+I+R, name="infection")
SIR$transition(I->R ~ gamma*I, name="recovery")
g = RGillespie$new(SIR)
g$simulate(0:100, y0=c(S=1000, I=10, R=0), parms=c(beta=0.4,gamma=0.2))

junlingm/REpiSim documentation built on Nov. 28, 2023, 2:35 a.m.