R/testColumnwiseIdentity.R
testColumnwiseIdentity.Rd
For all columns in the first data frame, check if the second data frame has identical values in columns of the same name
testColumnwiseIdentity(...)
two data frames given as named arguments. The argument names will appear in the output. By doing so you can give a longer expression that returns a data frame a short name 'on-the-fly'.
# Compare two identical data frames. Give them short names data.1 and data.2
testColumnwiseIdentity(data.1 = (x <- data.frame(a = 1:2, b = 2:3)),
data.2 = x)
#> identical(data.1[, "a"], data.2[, "a"])? TRUE
#> identical(data.1[, "b"], data.2[, "b"])? TRUE
# Compare two data frames differing in one column
testColumnwiseIdentity(A = data.frame(x = 1:2, y = 2:3),
B = data.frame(x = 1:2, y = 3:4))
#> identical(A[, "x"], B[, "x"])? TRUE
#> identical(A[, "y"], B[, "y"])? FALSE