Bimap-toTable {AnnotationDbi}R Documentation

Methods for extracting data from a Bimap object

Description

These methods are part of the Bimap interface.

They can be used to extract data from a Bimap object.

Usage

  ## 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)

Arguments

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).

Value

Author(s)

H. Pages

See Also

Bimap, BimapFormatting, AnnDbBimap-envirAPI

Examples

  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

[Package AnnotationDbi version 1.0.6 Index]