Code
all_equal(mtcars, mtcars)
Condition
Warning:
`all_equal()` was deprecated in dplyr 1.1.0.
i Please use `all.equal()` instead.
i And manually order the rows/cols as needed
Output
[1] TRUE
Code
all_equal(mtcars, mtcars[-1, ])
Output
[1] "Different number of rows."
Code
all_equal(iris, iris[-1, ])
Output
[1] "Different number of rows."
Code
all_equal(df_all, df_all[-1, ])
Output
[1] "Different number of rows."
Code
all_equal(mtcars, mtcars[, -1])
Output
Different number of columns: 11 vs 10.
Code
all_equal(iris, iris[, -1])
Output
Different number of columns: 5 vs 4.
Code
all_equal(df_all, df_all[, -1])
Output
Different number of columns: 7 vs 6.
Code
all_equal(df1, df2)
Output
Different types for column `x`: factor<38051> vs factor<bb232>.
Code
all_equal(df2, df1)
Output
Different types for column `x`: factor<bb232> vs factor<38051>.
Code
all_equal(df1, df2)
Output
Different types for column `x`: factor<4d52a> vs factor<38051>.
Code
all_equal(df2, df1)
Output
Different types for column `x`: factor<38051> vs factor<4d52a>.
Code
all_equal(df1, df2, convert = FALSE)
Output
Different types for column `x`: character vs factor<4d52a>.
Code
all_equal(df1, df2)
Output
Different types for column `x`: integer vs character.
Code
all_equal(df1, df2, convert = TRUE)
Output
Incompatible types for column `x`: integer vs character.
Code
all_equal(df1, df2)
Output
Different types for column `x`: integer vs double.
Code
all_equal(tibble(a = 1, b = 2), tibble(a = 1L, b = 2L))
Output
Different types for column `a`: double vs integer.
Different types for column `b`: double vs integer.
Code
all_equal(tibble(a = 1, b = 2), tibble(b = 2, a = 1), ignore_col_order = FALSE)
Output
Same column names, but different order.
Code
all_equal(tibble(a = 1, b = 2), tibble(a = 1), ignore_col_order = FALSE)
Output
Different number of columns: 2 vs 1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.