rbind two or more data frames with different columns
Take two data.frames with arbitraily different numbers and names of columns, and rbind them together.
merge_columns(x, y)
x |
A data.frame, or a list containing multiple data.frames. |
y |
An optional second data.frame. Only used if x is not a list. |
An object of class 'data.frame', containing data from all input data frames. That is, all unique columns are preserved, while rows that are missing data for a given column are assigned NA.
# import some data file_location <- system.file( "extdata", "avian_ecology_bibliography.ris", package = "revtools") x <- read_bibliography(file_location) y <- x[, 1:3] z <- merge_columns(x, y) # or equivalently z <- merge_columns(list(x, y))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.