toMatrix: Matrix representation of the order generated by a set of...

Description Usage Arguments Value Examples

View source: R/toMatrix.R

Description

Represent the order generated by a set of intervals as a boolean matrix. This is a common input format for programs that operate on partial orders.

Usage

1
toMatrix(intervals, strict = FALSE, binary = FALSE)

Arguments

intervals

data frame (see generateIntervals for the required format)

strict

is this <= or <?

binary

output is coded as 0/1 if TRUE and FALSE/TRUE otherwise

Value

A boolean matrix. If strict is set to TRUE, the (i, j)th entry is intervals[i, 'right'] < intervals[j, 'left']. If strict is set to false, <= is used in place of <.

Examples

1
2
intervals <- generateIntervals(10)
toMatrix(intervals)

rankUncertainty documentation built on Nov. 16, 2021, 1:07 a.m.