Req | R Documentation |
Use this function to select, by name, either compartments or derived variables that have been captured (see CAPTURE) into the simulated output.
Req(x, ...)
req(x, ...)
## S3 method for class 'mrgmod'
req(x, ...)
x |
model object. |
... |
unquoted names of compartments or tabled items. |
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 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.
mod <- mrgsolve::house()
mod %>% Req(CP,RESP) %>% ev(amt=1000) %>% mrgsim()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.