bind_rows_data: Bind rows

Description Usage Arguments Value Examples

View source: R/bind_rows.R

Description

Convenient wrapper around do.call("rbind", ...) that (a) sets the 'quote' argument to TRUE and (b) fills data frames with missing columns with NAs of the appropriate class.

Usage

1

Arguments

...

Input data frames or list of data frames

fill

Logical indicating whether to fill missing columns in data frames with missing values.

Value

The list collapsed into a single data frame

Examples

1
2
3
4
5
6
7
8
## list of data frames with inconsistent columns
x <- as_tbl_data(mtcars[1:3, ])
xx <- x
xx$y <- "a"
l <- list(x, xx, mtcars)

## bind rows and fill missing columns with NAs
bind_rows_data(l, fill = TRUE)

mkearney/tbltools documentation built on May 14, 2019, 4:02 a.m.