Run tests to check whether two GADSdat
objects are (nearly) equal.
equalData
compares variable names, number of rows in the data, and data differences.
equalMeta
compares variable names and meta data differences.
equalGADS
combines both functions. All functions produce a test report in list format.
Arguments
- target
A
GADSdat
object.- current
A
GADSdat
object.- id
A character vector containing the unique identifier columns of both
GADSdat
. If specified, bothGADSdat
are ordered according toid
before comparing their data.- metaExceptions
Should certain meta data columns be excluded from the comparison?
- tolerance
A numeric value greater than or equal to
0
. Differences smaller thantolerance
are not reported. The default value is close to1.5e-8
.
Value
Returns a list with the following entries:
- names_not_in_1
Which variables are included in
current
but not intarget
?- names_not_in_2
Which variables are included in
target
but not incurrent
?- data_nrow
Do the actual data sets have the same number of rows?
- data_differences
For which variables are the data different?
- meta_data_differences
For which variables are the meta data different?
Details
More detailed checks for individual variables can be performed via inspectDifferences
and inspectMetaDifferences
.