insert_rows | R Documentation |
Adding new rows from data frame sharing some columns.
Data contained in y
is assumed to be additional data and will be
appended.
Columns occurring in only one of the data frames will be added to the output.
insert_rows(x, y, ...)
## S4 method for signature 'data.frame,data.frame'
insert_rows(x, y, ...)
x |
A data frame. |
y |
A data frame including rows (and columns) to be inserted in |
... |
Addicional arguments passed among methods. |
A data frame.
## Merge data frames including new columns
data(iris)
iris$Species <- paste(iris$Species)
new_iris <- data.frame(Species = rep("humilis", 2), Height = c(15, 20),
stringsAsFactors = FALSE)
insert_rows(iris, new_iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.