Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

type

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 type() getter or setter is defined. Note that objects will either: not support the getter or setter at all, or support only the getter, or support the getter and setter.

value

The type to set on x (assuming x supports the type() setter). value is typically (but not necessarily) expected to be a single string (i.e. a character vector of length 1).

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

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

BiocGenerics

S4 generic functions used in Bioconductor

v0.36.1
Artistic-2.0
Authors
The Bioconductor Dev Team
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.