add.poset {pim} | R Documentation |
Add a poset to a pim.environment object
Description
This function adds a poset to a pim.environment
object.
Usage
add.poset(x, ...)
## S4 method for signature 'pim.environment'
add.poset(x, overwrite = FALSE, ...)
Arguments
x |
a pim.environment object |
... |
further parameters passed to |
overwrite |
a logical value indicating whether the poset
should be overwritten if it's already present. Defaults to
|
Value
The object with a (new) poset attached.
Warning
Although it might be tempting to pass the argument
nobs
to new.pim.poset
, you shouldn't.
The necessary information is taken from the respective slot
in the pim.environment
object.
If you provide a matrix or a list as value for the argument compare
,
note that you can easily create a poset that doesn't use all the
observations. This might or might not be your intention. If the poset
you try to create contains indices that go beyond the number of
observations, you will get errors.
See Also
new.pim.poset
for the possible values of the
arguments compare
and nobs
.
Examples
data(DysData)
Dysenv <- new.pim.env(DysData)
Dysenv
DysenvAll <- add.poset(Dysenv, overwrite = TRUE,
compare = 'all', nobs = nobs(DysData))
compare(Dysenv)
compare(DysenvAll)