Bimap-keymethods {AnnotationDbi} | R Documentation |
These methods are part of the Bimap interface.
They are devided in 3 groups: directed Bimap methods,
undirected Bimap methods and subsetting Bimap methods.
Unlike for undirected methods, the result of a directed method
depends on the direction of the Bimap object (left-to-right
or right-to-left, see direction
for more details).
The subsetting methods allow to extract a submap from a Bimap
object by restricting the mapping to a subset of keys.
## Directed Bimap methods keys(x) #length(x) isNA(x) mappedkeys(x) count.mappedkeys(x) ## Undirected Bimap methods Lkeys(x) Rkeys(x) Llength(x) Rlength(x) mappedLkeys(x) mappedRkeys(x) count.mappedLkeys(x) count.mappedRkeys(x) ## Subsetting Bimap methods keys(x) <- value #x[i] Lkeys(x) <- value Rkeys(x) <- value subset(x, ...)
x |
A Bimap object. |
value |
A character vector containing the new keys (must be a subset of the current keys). |
i |
Index specifying map elements to extract. |
... |
Extra arguments can be:
|
H. Pages
Bimap, BimapFormatting, AnnDbBimap-envirAPI
library(hgu95av2.db) x <- hgu95av2GO x length(x) count.mappedkeys(x) x[1:3] links(x[1:3]) ## Keep only mapped keys keys(x) <- mappedkeys(x) length(x) count.mappedkeys(x) x # now it is a submap ## The above can be achieved with x <- hgu95av2GO[mappedkeys(hgu95av2GO)] ## mappedkeys() and count.mappedkeys() also work with an environment ## or a list z <- list(k1=NA, k2=letters[1:4], k3="x") mappedkeys(z) count.mappedkeys(z)