Description Usage Arguments Value Examples
View source: R/merge_by_rownames.R
This is a wrapper function based on the base R merge() function for merging two dataframes or matrices by their rownames and returing a dataframe or matrix with the appropriate rownames. Unlike merge, this function does not create an additional column for rownames.
1 | merge_by_rownames(x, y, all.x = TRUE, all.y = TRUE, sort = FALSE)
|
x, y |
dataframes or matrices |
all.x |
logical; if TRUE, then extra rows will be added to the output, one for each row in x that has no matching row in y. These rows will have NAs in those columns that are usually filled with values from y. Defaults to TRUE |
all.y |
logical; analogous to all.x |
sort |
logical; if TRUE, result will be sorted by columns. Defaults to FALSE |
A merged dataframe or matrix with the appropriate rownames
1 | merge_by_rownames(data.frame1, data.frame2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.