Description Usage Arguments See Also Examples
View source: R/cbind_matches.R
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).
1 | cbind_matches(df1, df2, ind_col)
|
df1 |
data frame |
df2 |
data frame |
ind_col |
character value giving the index column name |
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.