boxplot,SimInf_model-method {SimInf} | R Documentation

## Box plot of number of individuals in each compartment

### Description

Produce box-and-whisker plot(s) of the number of individuals in each model compartment.

### Usage

    ## S4 method for signature 'SimInf_model'
    boxplot(x, ...)

### Arguments

`x` | The `model` to plot
`...` | Additional arguments affecting the plot produced.

### Examples

    ## Create an 'SIR' model with 10 nodes and initialise
    ## it with 99 susceptible individuals and one infected
    ## individual. Let the model run over 100 days.
    model <- SIR(u0 = data.frame(S = rep(99, 10),
                                 I = rep(1, 10),
                                 R = rep(0, 10)),
                 tspan = 1:100,
                 beta = 0.16,
                 gamma = 0.077)

    ## Run the model and save the result.
    result <- run(model, threads = 1)

    ## Create a boxplot
    boxplot(result)

[Package SimInf version 6.3.0 Index]