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

append

Append elements to a vector-like object


Description

Append (or insert) elements to (in) a vector-like object.

NOTE: This man page is for the append S4 generic function defined in the BiocGenerics package. See ?base::append for the default method (defined in the base package). Bioconductor packages can define specific methods for objects (typically vector-like or data-frame-like) not supported by the default method.

Usage

append(x, values, after=length(x))

Arguments

x

The vector-like object to be modified.

values

The vector-like object containing the values to be appended to x. values would typically be of the same class as x, but not necessarily.

after

A subscript, after which the values are to be appended.

Value

See ?base::append for the value returned by the default method.

Specific methods defined in Bioconductor packages will typically return an object of the same class as x and of length length(x) + length(values).

See Also

  • base::append for the default append method.

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

  • selectMethod for getting the definition of a specific method.

  • append,Vector,Vector-method in the S4Vectors package for an example of a specific append method (defined for Vector objects).

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

Examples

append  # note the dispatch on the 'x' and 'values' args only
showMethods("append")
selectMethod("append", c("ANY", "ANY"))  # the default method

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.