Accessing the type of an object
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.
type(x) type(x) <- value
x |
Any object for which the |
value |
The type to set on |
type(x)
returns the type of x
, typically (but not necessarily)
as a single string (i.e. as a character vector of length 1).
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.
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")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.