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

rbindFill

Combine R Objects by Row


Description

This function combines instances of matrix, data.frame or DataFrame objects into a single instance adding eventually missing columns (filling them with NAs).

Usage

rbindFill(...)

Arguments

...

2 or more: matrix, data.frame or DataFrame.

Value

Depending on the input a single matrix, data.frame or DataFrame.

Note

rbindFill might not work if one of the columns contains S4 classes.

Author(s)

Johannes Rainer, Sebastian Gibb

See Also

Other helper functions for developers: between(), isPeaksMatrix(), validPeaksMatrix(), vapply1c()

Examples

## Combine matrices
a <- matrix(1:9, nrow = 3, ncol = 3)
colnames(a) <- c("a", "b", "c")
b <- matrix(1:12, nrow = 3, ncol = 4)
colnames(b) <- c("b", "a", "d", "e")
rbindFill(a, b)
rbindFill(b, a, b)

MsCoreUtils

Core Utils for Mass Spectrometry Data

v1.2.0
Artistic-2.0
Authors
RforMassSpectrometry Package Maintainer [cre], Laurent Gatto [aut] (<https://orcid.org/0000-0002-1520-2268>), Johannes Rainer [aut] (<https://orcid.org/0000-0002-6977-7147>), Sebastian Gibb [aut] (<https://orcid.org/0000-0001-7406-4443>), Adriaan Sticker [ctb], Sigurdur Smarason [ctb], Thomas Naake [ctb]
Initial release

We don't support your browser anymore

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