compare: Compare two tables

Description Usage Arguments Value Examples

View source: R/compare.R

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

1
compare(x, y)

Arguments

x

the first data frame

y

the second data frame

Value

data frame

Examples

1
2
3
4
5
6
7
8
9
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)

actuaryr documentation built on April 14, 2020, 6:15 p.m.