upset: upset

Description Usage Arguments Examples

View source: R/upset.R

Description

The function returns a boolean vector indicating if each element of the poset is dominated by (or equal to) at least an element of the subset Q.

Usage

1
2
3
4
5
upset(z, ...)
## S3 method for class 'cover'
upset(z, ...)
## S3 method for class 'incidence'
upset(z, Q = NULL, ...)

Arguments

z

a cover or an incidence matrix, respectivelly of S3 classes cover or incidence.

Q

vector to select a subset of the profiles in the poset defined through z.

...

any of above.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
z <- getzeta(var2prof(varlen = c(2, 2, 2)))

plot(z, col = 1 + c(1, 1, 0, 0, 1, 0, 0, 0) + c(0, 0, 0, 2, 0, 0, 2, 2), lwd = 2)

Q <- c(4, 7, 8)
rownames(z)[Q]
upset(z, Q)

Q <- c("211", "112", "111")
upset(z, Q)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: netrankr

Attaching package: 'parsec'

The following objects are masked from 'package:igraph':

    transitivity, vertices

[1] "221" "122" "222"
  111   211   121   221   112   212   122   222 
FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE  TRUE 
 111  211  121  221  112  212  122  222 
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 

parsec documentation built on May 2, 2019, 6:08 p.m.