R: Request simulated output

Req {mrgsolve} | R Documentation

## Request simulated output

### Description

Use this function to select, by name, either compartments or derived variables that have been captured (see `CAPTURE`) into the simulated output.

### Usage

    Req(x, ...)

    req(x, ...)

    ## S3 method for class 'mrgmod'
    req(x, ...)

### Arguments

`x` | model object
`...` | unquoted names of compartments or tabled items

### Details

There is also a `Req` argument to `mrgsim` that can be set to accomplish the same thing as a call to `Req` in the pipeline.

Note the difference between `req` and `Req`: the former only selects compartments to appear in output while the latter selects both compartments and captured items. Also, when there are items are explicitly listed in `Req`, all other compartments or captured items not listed there are ignored. But when compartments are selected with `req` all of the captured items are returned. Remember that `req` is strictly for compartments.

### Examples

    mod <- mrgsolve::house()

    mod %>% Req(CP,RESP) %>% ev(amt=1000) %>%  mrgsim

[Package mrgsolve version 1.0.4 Index]