Learn R Programming

ThomasJeffersonUniv (version 0.1.3)

rbinds: Row-Bind a list of data.frame

Description

..

Usage

rbinds(x, make.row.names = FALSE, ..., .id = "idx")

Value

Function rbinds returns a data.frame.

Arguments

x

a list of named data.frame

make.row.names, ...

additional parameters of rbind.data.frame

.id

character value to specify the name of ID column, nomenclature follows rbindlist

Details

Yet to look into ggplot2:::rbind_dfs closely.

Mine is slightly slower than the fastest alternatives, but I have more checks which are useful.

References

https://stackoverflow.com/questions/2851327/combine-a-list-of-data-frames-into-one-data-frame

Examples

Run this code
x = list(A = swiss[1:3, 1:2], B = swiss[5:9, 1:2]) # list of 'data.frame'
rbinds(x)
rbinds(x, make.row.names = TRUE)

Run the code above in your browser using DataLab