powered by
Identifies keys that are new, removed, or common between two keyed data frames. Does not compare values, only key membership.
compare_keys(x, y, by = NULL)
A key comparison object.
First keyed data frame.
Second keyed data frame.
Column(s) to compare. If NULL, uses the key from x.
df1 <- key(data.frame(id = 1:3, x = 1:3), id) df2 <- key(data.frame(id = 2:4, x = 2:4), id) compare_keys(df1, df2)
Run the code above in your browser using DataLab