Description Usage Arguments Examples
Uses identical()
(or some other comparison function) to check if
every argument is equal to one another.
1 2 3 |
... |
arguments to be compared |
.check |
alternative function to be used to compare the arguments |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | df <- tibble::tibble(x = runif(10), y = runif(10))
df2 <- df
df3 <- df
df4 <- df
# To ensure the three variables have been copied
df$z <- 1
df2$z <- 1
df3$z <- 1
df4$z <- 2
all_equal(df, df2, df3)
all_equal(df, df2, df4)
new_df <- check_all_equal(df, df2, df3)
## Not run:
check_all_equal(df, df4)
## End(Not run)
x <- 1
y <- 1
z <- 1
all_equal(x, y, z, .check = magrittr::equals)
w <- check_all_equal(x, y, z, .check = magrittr::equals)
## Not run:
check_all_equal(x, y, z, 2, .check = magrittr::equals)
check_all_equal(x, 2, .check = magrittr::equals)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.