| get {BiocGenerics} | R Documentation |
Return the value of a named object
Description
Search for an object with a given name and return it.
NOTE: This man page is for the get and mget S4 generic
functions defined in the BiocGenerics package.
See ?base::get for the default methods
(defined in the base package).
Bioconductor packages can define specific methods for objects
(list-like or environment-like) not supported by the default methods.
Usage
get(x, pos=-1, envir=as.environment(pos), mode="any", inherits=TRUE)
mget(x, envir, mode="any", ifnotfound, inherits=FALSE)
Arguments
x |
For For |
envir |
Where to look for the key(s). Typically a list-like or environment-like object. |
pos, mode, inherits, ifnotfound |
See |
Details
See ?base::get for details about the default methods.
Value
For get: The value corresponding to the specified key.
For mget: The list of values corresponding to the specified keys.
The returned list must have one element per key, and in the same order
as in x.
See ?base::get for the value returned by the
default methods.
See Also
-
base::getfor the defaultgetandmgetmethods. -
showMethodsfor displaying a summary of the methods defined for a given generic function. -
selectMethodfor getting the definition of a specific method. -
get,ANY,Bimap,missing-method in the AnnotationDbi package for an example of a specific
getmethod (defined for Bimap objects). -
BiocGenerics for a summary of all the generics defined in the BiocGenerics package.
Examples
get # note the dispatch on the 'x', 'pos' and 'envir' args only
showMethods("get")
selectMethod("get", c("ANY", "ANY", "ANY")) # the default method
mget # note the dispatch on the 'x' and 'envir' args only
showMethods("mget")
selectMethod("mget", c("ANY", "ANY")) # the default method