cbind_matches: Combine data frames column-wise by matching rows

Description Usage Arguments See Also Examples

View source: R/cbind_matches.R

Description

Finds all rows in two data frames that have matching entries for an index column and returns a data frame with only these rows combined, ordered by the index column entries (as order() would order them).

Usage

1
cbind_matches(df1, df2, ind_col)

Arguments

df1

data frame

df2

data frame

ind_col

character value giving the index column name

See Also

order

Examples

1
2
3
df1 <- data.frame(z = c(3, 2, 8, 6), y = c("foo", "bar", "spam", "mayo"))
df2 <- data.frame(x = c(310, 580, 43, 7), y = c("top", "foo", "hurr", "bar"))
cbind_matches(df1, df2, "y")

AnonZebra/synratss documentation built on Oct. 9, 2021, 2:31 a.m.