mat_join_compare | R Documentation |
Merge, and for all identical variables, compare
mat_join_compare(
df1,
df2,
by = NULL,
join_fun = dplyr::inner_join,
tol = 1e-08
)
df1 , df2 |
The two df to compare |
by |
the key variables |
join_fun |
the type of join |
tol |
tolerance value |
library(dplyr)
data(iris_tb)
iris_orig <- mutate(iris_tb, row_num = 1:n())
iris_new <- mutate(iris_orig, Sepal.Length =Sepal.Length+0.000001)
mat_join_compare(df1=iris_orig, df2=iris_new, by = c("row_num", "Species"))
mat_join_compare(df1=iris_orig, df2=iris_new, by =c("row_num", "Species"), tol = 0.00001)
## compare identical but smaller subset with inner_join:
iris_smaller <- subset(iris_orig, Species!="setosa")
mat_join_compare(df1=iris_orig, df2=iris_smaller, by = c("row_num", "Species"),
join_fun = dplyr::full_join)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.