Professional Documents
Culture Documents
Dplyr All Equal in R
Dplyr All Equal in R
You can use all_equal() with any data frame, and dplyr also provides tbl_df methods for
all.equal().
Usage
all_equal(target, current, ignore_col_order = TRUE, ignore_row_order = TRUE,
convert = FALSE, ...)
Arguments
Value
TRUE if equal, otherwise a character vector describing the reasons why they're not equal. Use
isTRUE() if using the result in an if expression.
Examples
scramble <- function(x) x[sample(nrow(x)), sample(ncol(x))]