Description Usage Arguments Value Slots Author(s) See Also Examples
The Sets
class implements a container to describe distinct objects that make up sets, along with element metadata and set metadata.
1 2 |
relations |
|
elementInfo |
|
setInfo |
|
A Sets
object.
relations
Hits
The left node and right node of each hit stores the index of the element
and set
in elementInfo
and setInfo
, respectively.
Metadata for each relation is stored as mcols(relations(object))
.
elementInfo
IdVector
.
Metadata for each unique element in relations$element
is stored as mcols(elementInfo)
.
setInfo
IdVector
.
Metadata for each unique set in relations$set
is stored as mcols(setInfo)
.
Kevin Rue-Albrecht
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # Constructor ----
# Visually intuitive definition of sets
sets <- list(
set1=c("A", "B"),
set2=c("B", "C", "D"),
set3=c("E"))
bs <- as(sets, "Sets")
bs
# Coercing ----
# to list (gene sets)
ls1 <- as(bs, "list")
ls1
# to matrix (logical membership)
m1 <- as(bs, "matrix")
m1
# Accessors ----
relations(bs)
elementInfo(bs)
setInfo(bs)
# Dimensions ----
length(bs)
nElements(bs)
nSets(bs)
setLengths(bs)
elementLengths(bs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.