cbind: Combine objects by rows or columns

Description Usage Arguments Value See Also Examples

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

1
2
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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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")

Example output

Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

standardGeneric for "rbind" defined from package "BiocGenerics"

function (..., deparse.level = 1) 
standardGeneric("rbind")
<bytecode: 0x55ea1d896e38>
<environment: 0x55ea1d88d1f0>
Methods may be defined for arguments: ...
Use  showMethods("rbind")  for currently available ones.
Function: rbind (package BiocGenerics)
...="ANY"

Method Definition (Class "derivedDefaultMethod"):

function (..., deparse.level = 1) 
.Internal(rbind(deparse.level, ...))
<bytecode: 0x55ea1d89aaf0>
<environment: namespace:base>

Signatures:
        ...  
target  "ANY"
defined "ANY"
standardGeneric for "cbind" defined from package "BiocGenerics"

function (..., deparse.level = 1) 
standardGeneric("cbind")
<bytecode: 0x55ea1e13c6b0>
<environment: 0x55ea1e12d2f8>
Methods may be defined for arguments: ...
Use  showMethods("cbind")  for currently available ones.
Function: cbind (package BiocGenerics)
...="ANY"

Method Definition (Class "derivedDefaultMethod"):

function (..., deparse.level = 1) 
.Internal(cbind(deparse.level, ...))
<bytecode: 0x55ea1e147838>
<environment: namespace:base>

Signatures:
        ...  
target  "ANY"
defined "ANY"
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Function: rbind (package BiocGenerics)
...="ANY"
...="FilterMatrix"
...="List"
...="RectangularData"

Method Definition:

function (..., deparse.level = 1) 
{
    if (!identical(deparse.level, 1)) 
        warning(wmsg("the rbind() method for RectangularData objects ", 
            "ignores the 'deparse.level' argument"))
    objects <- list(...)
    bindROWS(objects[[1L]], objects = objects[-1L])
}
<bytecode: 0x55ea1f894240>
<environment: namespace:S4Vectors>

Signatures:
        ...              
target  "RectangularData"
defined "RectangularData"
Method Definition:

function (..., deparse.level = 1) 
{
    if (!identical(deparse.level, 1)) 
        warning(wmsg("the cbind() method for DataFrame objects ", 
            "ignores the 'deparse.level' argument"))
    DataFrame(..., check.names = FALSE)
}
<bytecode: 0x55ea1ecf8730>
<environment: namespace:S4Vectors>

Signatures:
        ...        
target  "DataFrame"
defined "DataFrame"

BiocGenerics documentation built on April 17, 2021, 6:01 p.m.