| print.simpr_spec | R Documentation |
Accessor & display methods for simpr_spec class
## S3 method for class 'simpr_spec'
print(x, ...)
new_simpr_spec()
is.simpr_spec(x)
x |
a |
... |
ignored |
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.
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.