merge_by_rownames: Merge dataframes or matrices by rownames

Description Usage Arguments Value Examples

View source: R/merge_by_rownames.R

Description

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.

Usage

1
merge_by_rownames(x, y, all.x = TRUE, all.y = TRUE, sort = FALSE)

Arguments

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

Value

A merged dataframe or matrix with the appropriate rownames

Examples

1
merge_by_rownames(data.frame1, data.frame2)

jacobheng/cellwrangler documentation built on Aug. 12, 2019, 6:49 a.m.