Description Usage Arguments Value Examples
View source: R/merge_columns.R
Take two data.frames with arbitraily different numbers and names of columns, and rbind them together.
1 | 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.
1 2 3 4 5 6 7 8 9 10 | # 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.