Skip to contents

This function is to quickly merge two dataframe by rownames, but can choose to leave A or B all information

Usage

Tomerge_v2(A, B, leavex = T, leavey = F)

Arguments

A

dataframe A

B

dataframe B

Value

return a data frame with merged information

Examples

A <- data.frame(x = 1:2, row.names = c("a", "b"))
B <- data.frame(y = 3:4, row.names = c("b", "c"))
Tomerge_v2(A, B, leavex = TRUE, leavey = TRUE)
#>    x  y
#> a  1 NA
#> b  2  3
#> c NA  4