Learn R Programming

actuaryr (version 1.1.1)

compare: Compare two tables

Description

Returns the effect of comparison of the two tables. It gets common columns and number of rows of the two tables. In case of type mismatches, it coerces the weaker type into a stronger type. The output contains the absolute difference for numerical values and the_same/different for characters.

Usage

compare(x, y)

Arguments

x

the first data frame

y

the second data frame

Value

data frame

Examples

Run this code
# NOT RUN {
x <- data.frame(
  a = rep(1, 3),
  b = rep(2, 3)
)
y <- data.frame(
  a = rep(2, 3),
  b = rep(2, 3)
)
compare(x, y)
# }

Run the code above in your browser using DataLab