Learn R Programming

eatGADS (version 1.1.1)

inspectDifferences: Inspect differences in a variable.

Description

Inspect differences within a single GADSdat or between two GADSdat objects for a specific variable.

Usage

inspectDifferences(
  GADSdat,
  varName,
  other_GADSdat = GADSdat,
  other_varName = varName,
  id
)

Value

A list.

Arguments

GADSdat

A GADSdat object.

varName

A character vector of length 1 containing the variable name.

other_GADSdat

A second GADSdat object. If omitted, it is assumed that both variables are part of the first GADSdat.

other_varName

A character vector of length 1 containing the other variable name. If omitted, it is assumed that both variables have identical names (as supplied in varName).

id

A character vector of length 1 containing the unique identifier column of both GADSdat.

Details

Two GADSdat objects can be compared using equalGADS. If differences in the data for specific variables in the two objects occur, these variables can be further inspected using inspectDifferences. Differences on meta data-level can be inspected via inspectMetaDifferences.

Examples

Run this code
# create a second GADS with different data
pisa2 <- pisa
pisa2$dat$age[400:nrow(pisa$dat)] <- sample(pisa2$dat$age[400:nrow(pisa$dat)])

# inspect via equalGADS()
equalGADS(pisa, pisa2)

# inspect via inspectDifferences()
inspectDifferences(GADSdat = pisa, varName = "age", other_GADSdat = pisa2, id = "idstud")

Run the code above in your browser using DataLab