merge_datasets | R Documentation |
This function allows you to merge two data.frames by their overlapping rownames. About 15 times faster than the earlier version.
merge_datasets(
DF1,
DF2,
join = "both",
overwrite_NA = FALSE,
restore_factors = FALSE
)
DF1 |
(data.frame) A data.frame to merge into. |
DF2 |
(data.frame) A data.frame with the new data. |
join |
(character scalar) Which data.frame to use cases from. Options: left, right, both. |
overwrite_NA |
(lgl scalar) Whether to overwrite with NA values. |
restore_factors |
(lgl scalar) Whether to recreate factors in the merged data.frame. Does not keep levels. |
merge_datasets(iris[1:4], iris[1:5]) #merge together two parts of iris
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.