Bimap-toTable {AnnotationDbi} | R Documentation |
These methods are part of the Bimap interface.
They can be used to extract data from a Bimap object.
## Extract the data (undirected methods) toTable(x) head(x, ...) tail(x, ...) links(x) ## Some basic counting on the data without actually extracting them (undirected methods) nrow(x) #dim(x) count.links(x) nhit(x)
x |
A Bimap object (or a list or an environment for nhit ).
|
... |
Further arguments to be passed to or from other methods (see
head or tail
for the details).
|
H. Pages
Bimap, BimapFormatting, AnnDbBimap-envirAPI
library(GO.db) x <- GOSYNONYM x toTable(x)[1:4, ] toTable(x["GO:0007322"]) links(x)[1:4, ] links(x["GO:0007322"]) nrow(x) dim(x) count.links(x) y <- GOBPCHILDREN nhy <- nhit(y) # 'nhy' is a named integer vector identical(names(nhy), keys(y)) # TRUE table(nhy) sum(nhy == 0) # number of GO IDs with no children names(nhy)[nhy == max(nhy)] # the GO ID(s) with the most direct children ## Some sanity check sum(nhy) == count.links(y) # TRUE