| test_errors | R Documentation | 
Compare numeric variables in a data frame based on root-squared differences
test_errors( reference, target, vars, tolerance = 0.001005, return_logical = TRUE )
reference | 
 a data frame giving reference data  | 
target | 
 a data frame giving target data  | 
vars | 
 character vector of variable names to compare in each data frame  | 
tolerance | 
 allowable difference between numeric values  | 
return_logical | 
 logical. Should result be given as a logical vector (indicating TRUE/FALSE equality within tolerance) or a data frame of error summary values?  | 
If return_logical = TRUE, a named logical vector with one
element per variable compared, indicating whether the maximum and
root-mean-squared differences fall within the tolerance. If
return_logical = FALSE, a data frame indicating the variables
compared and the maximum and root-mean-squared differences.
It is assumed that reference and target have equal
numbers of rows.
reference <- data.frame(
a = 1:100, b = 75:174
)
target <- data.frame(
  a = 0.001 + (1:100),
  b = 76:175
)
test_errors(reference, target, c("a", "b"))
test_errors(reference, target, c("a", "b"), return_logical = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.