type {BiocGenerics} | R Documentation |
Accessing the type of an object
Description
Get or set the type of an object.
Note that type
and type<-
are defined as S4 generic
functions and what type means exactly (and what type()
returns) depends on the objects for which type
and/or type<-
methods are defined.
Usage
type(x)
type(x) <- value
Arguments
x |
Any object for which the |
value |
The type to set on |
Value
type(x)
returns the type of x
, typically (but not necessarily)
as a single string (i.e. as a character vector of length 1).
See Also
-
showMethods
for displaying a summary of the methods defined for a given generic function. -
selectMethod
for getting the definition of a specific method. -
type,ANY-method in the DelayedArray package for the default
type
method. -
type,PairwiseAlignments-method in the Biostrings package for an example of a specific
type
method (defined for PairwiseAlignments objects). -
BiocGenerics for a summary of all the generics defined in the BiocGenerics package.
Examples
type
showMethods("type")
`type<-`
showMethods("type<-")
library(DelayedArray)
showMethods("type")
selectMethod("type", "ANY") # the default "type" method
library(Biostrings)
showMethods("type")
## The type() method for PairwiseAlignments objects:
selectMethod("type", "PairwiseAlignments")