Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Req

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

mrgsolve

Simulate from ODE-Based Models

v0.11.1
GPL (>= 2)
Authors
Kyle T Baron [aut, cre] (<https://orcid.org/0000-0001-7252-5656>), Bill Gillespie [ctb], Charles Margossian [ctb], Devin Pastoor [ctb], Bill Denney [ctb] (<https://orcid.org/0000-0002-5759-428X>), Dilawar Singh [ctb], Felicien Le Louedec [ctb] (<https://orcid.org/0000-0003-3699-2729>), Timothy Waterhouse [ctb] (<https://orcid.org/0000-0002-0954-9660>), Metrum Research Group [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.