print.simpr_spec {simpr} | R Documentation |
Methods for simpr_spec class
Description
Accessor & display methods for simpr_spec class
Usage
## S3 method for class 'simpr_spec'
print(x, ...)
new_simpr_spec()
is.simpr_spec(x)
Arguments
x |
a |
... |
ignored |
Details
Class simpr_spec
is created by
specify
and/or
define
to specify the simulation
variables, which is produced by
generate
.
The print method provides an overview of the
specification, including the conditions.
Value
print.simpr_spec
has no return value
and is called for its side-effects.
new_simpr_spec
returns an empty
simpr_spec
object. is.simpr_spec
returns
a length-1 logical vector, TRUE
or FALSE
,
which indicates whether an object is a
simpr_spec
.
Examples
empty = new_simpr_spec()
print(empty)
## Easiest to create a simpr_spec with specify
simple_spec = specify(a = ~ rbinom(n, size, prob))
print(simple_spec)
## Adding on define adds all possible combinations
## of conditions and more info in output.
defined_spec = specify(a = ~ rbinom(n, size, prob)) %>%
define(n = c(10, 20),
size = c(20, 40),
prob = c(0.2, 0.4))
print(defined_spec)
[Package simpr version 0.2.6 Index]