Learn R Programming

gosset (version 1.4)

rowbind: Combine R objects by rows

Description

Combine R objects when number and names of columns do not match

Usage

rowbind(x, ...)

# S3 method for default rowbind(x, y, ...)

# S3 method for list rowbind(x, ...)

Value

a data.frame with the combined data

Arguments

x

a R object, typically a data.frame, matrix or list

...

additional arguments passed to methods

y

a matrix, a data.frame (or any other object that can be coerced to data.frame)

Examples

Run this code
 
# two data frames
rowbind(airquality, mtcars)

# a list of data frames
l = list(airquality, mtcars)
rowbind(l)

Run the code above in your browser using DataLab