compareDataFrames | R Documentation |
Compare two data frames by columns
compareDataFrames(
x,
y,
dbg = FALSE,
xname = deparse(substitute(x)),
yname = deparse(substitute(y))
)
x |
first data frame |
y |
second data frame |
dbg |
if |
xname |
name of first data frame to appear in the output if |
yname |
name of second data frame to appear in the output if |
list of logical
x <- data.frame(a = 1:2, b = 2:3)
y <- x
test1 <- all(unlist(compareDataFrames(x, y)))
z <- compareDataFrames(x, y[, c("b", "a")])
expectedFalse <- c("identical", "identicalExceptAttributes", "sameColumnNames")
test2 <- all(names(which(!unlist(z))) == expectedFalse)
test1 && test2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.