poset {pim}R Documentation

Extract the poset as a matrix or list

Description

This function allows you to extract the poset from either a pim.environment or a pim.poset object. The poset can be extracted as a matrix or a list.

Usage

poset(x, ...)

## S4 method for signature 'pim.environment'
poset(x, ...)

## S4 method for signature 'pim.poset'
poset(x, as.list = FALSE)

## S4 method for signature 'environment'
poset(x, as.list = FALSE)

## S4 method for signature 'pim'
poset(x, ...)

## S4 method for signature 'pim.formula'
poset(x, ...)

Arguments

x

an object of class pim.environment, pim.formula, pim or pim.poset, or an environment derived from either object.

...

arguments passed to other methods. Currently ignored.

as.list

a logical value indicating whether the poset should be returned as list or as a matrix. Defaults to FALSE, which returns a matrix

Value

When x contains a poset, either a matrix or a list (when as.list is TRUE) with the indices that make up the poset. If there's no poset, the function returns a missing value.

The returned matrix hax 2 columns, each named after the respective poset function. In case a list is requested, the function returns a named list with 2 elements, each element containing the indices related to the poset function of the same name (either L or R).

Examples

data(DysData)
DysPimEnv <- new.pim.env(DysData)
poset(DysPimEnv)


[Package pim version 2.0.2 Index]