dataCompareR (version 0.1.2)

prepareData: prepareData Prepares data for comparison in 3 stages. 1. Match columns - filter dataframes to those columns that match and summarise differences 2. Match rows - filter dataframes to those rows that match and summarise differences 3. Coerce data

Description

prepareData Prepares data for comparison in 3 stages. 1. Match columns - filter dataframes to those columns that match and summarise differences 2. Match rows - filter dataframes to those rows that match and summarise differences 3. Coerce data

Usage

prepareData(dfA, dfB, keys = NA, trimChars = TRUE)

Arguments

dfA

data frame. The first data object. dataCompareR will attempt to coerce all data objects to data frames.

dfB

data frame. The second data object. dataCompareR will attempt to coerce all data objects to data frames.

keys

String. Name of identifier column(s) used to compare dfA and dfB. NA if no identifier (row order will be used instead), a character for a single column name, or a vector of column names to match of multiple columns

trimChars

Boolean. If true, strings and factors have whitespace trimmed before comparison.

Value

dataCompareRObject containing details of the comparison

Examples

Run this code
# NOT RUN {
dfA <- iris
# }
# NOT RUN {
dfB <- iris
# }
# NOT RUN {
keys <- NA
# }
# NOT RUN {
prepareData(dfA,dfB,keys, trimChars = TRUE)
# }

Run the code above in your browser using DataCamp Workspace