Compare two model data
compareModelData(
dat_orig,
dat,
intersect.names = TRUE,
ignore.variable = NULL,
ignore.process.variable = NULL,
skipNAFraction = FALSE,
skipNAAt = NULL,
NAReplacement = NULL,
ignoreEqual = FALSE,
classOf = c("first", "second"),
data.out = FALSE,
processesToCheck = NULL,
sort = TRUE,
compareReports = FALSE,
checkOutputFiles = TRUE,
tolerance = sqrt(.Machine$double.eps),
debug = FALSE,
check.columnNames_identical = FALSE,
testAllTRUE = FALSE,
...
)The original and new data to compare.
Logical: If TRUE, compare only same named columns.
A vector of names of variables/columns to ignore in the comparison.
A list of variables to ignore for different processes, named by the processes, e.g. list(MeanNASC = c("MinLayerDepth", "MaxLayerDepth")).
Logical: If TRUE, skip rows with more than 50 percent NAs. Can also be set to a numeric value between 0 and 1.
A vector of strings naming the columns in which NA values identifies rows to skip. If more than one variable is given and more than one of these are present in a table, all rows where at least one of the variables are NA are skipped. Note that this may reduce the number of rows and may results in diffs for that reason. Using this option is best used in combination with mergeWhenDifferentNumberOfRows.
List of replacement values for different classes of NA, applied after any merging as to incorporate NAs generated during merging.
Logical: If TRUE, ignore columns where all values are equal.
Character string specifying whether to compare after converting to the class of the first or second table. Set this to "first" (default) to convert class to the original data.
Logical, if TRUE output the original and new data along with the tests. data.out = NULL implies data.out = FALSE if no difference was found and data.out = TRUE otherwise.
Character: A vector of the names of the processes to compare.
Logical, if TRUE sort the tables before all.equal. When mergeWhenDifferentNumberOfRows = TRUE the tables are always sorted.
Logical, if TRUE compare the report specifically (old method kept for robustness).
Logical, if TRUE compare the file names of the output files.
The tolerance to use in all.equal.
Logical: If TRUE, interrupt the execution just before priting the test results.
Logical: If TRUE, test that the column names are identical between corresponding tables of the original and new data.
Logical: If FALSE, only test differences between common rows between tables that are compared by merging. If TRUE the function reports test failures when the extra rows from merging wih all = TRUE contains differences.
Used in runModel().