cbind: Combine objects by rows or columns

cbindR Documentation

Combine objects by rows or columns

Description

rbind and cbind take one or more objects and combine them by columns or rows, respectively.

NOTE: This man page is for the rbind and cbind S4 generic functions defined in the BiocGenerics package. See ?base::cbind for the default methods (defined in the base package). Bioconductor packages can define specific methods for objects (typically vector-like or matrix-like) not supported by the default methods.

Usage

rbind(..., deparse.level=1)
cbind(..., deparse.level=1)

Arguments

...

One or more vector-like or matrix-like objects. These can be given as named arguments.

deparse.level

See ?base::cbind for a description of this argument.

Value

See ?base::cbind for the value returned by the default methods.

Specific methods defined in Bioconductor packages will typically return an object of the same class as the input objects.

See Also

  • base::cbind for the default rbind and cbind methods.

  • showMethods for displaying a summary of the methods defined for a given generic function.

  • selectMethod for getting the definition of a specific method.

  • rbind,RectangularData-method and cbind,DataFrame-method in the S4Vectors package for examples of specific rbind and cbind methods (defined for RectangularData derivatives and DataFrame objects, respectively).

  • BiocGenerics for a summary of all the generics defined in the BiocGenerics package.

Examples

rbind  # note the dispatch on the '...' arg only
showMethods("rbind")
selectMethod("rbind", "ANY")  # the default method

cbind  # note the dispatch on the '...' arg only
showMethods("cbind")
selectMethod("cbind", "ANY")  # the default method

library(S4Vectors)
showMethods("rbind")
## The rbind() method for RectangularData derivatives:
selectMethod("rbind", "RectangularData")
## The cbind() method for DataFrame objects:
selectMethod("cbind", "DataFrame")

Bioconductor/BiocGenerics documentation built on Nov. 17, 2024, 6:52 p.m.