Review columns comparing it to another set of columns and spots differences
review_variables.Rd
review_variables is a wrapper around review_one_variable
Usage
review_variables(
dataset,
columns_to_review,
columns_to_compare_with,
uuid_column = "uuid",
prefix = "review"
)
Arguments
- dataset
A dataset to be check.
- columns_to_review
Vectors of columns to review (should be paired with columns_to_compare_with).
- columns_to_compare_with
Vectors of columns to compare with (should be paired with columns_to_review).
- uuid_column
uuid column in the dataset. Default is uuid.
- prefix
Prefix to be used for the review and comment column. Default is "review"
Examples
test_numeric_2_var <- data.frame(
test = c(
"test equality",
"test difference",
"test Missing in y",
"test Missing in x",
"test equality rounding in x",
"test equality rounding in y",
"test difference rounding in x",
"test difference rounding in y"
),
stat_col_one.x = c(0, 1, 2, NA, 0.00019, 0.0002, 0.00035, 0.0003),
stat_col_two.x = c(0, 1, 2, NA, 0.00019, 0.0002, 0.00035, 0.0003),
stat_col_one.y = c(0, 2, NA, 3, 0.0002, 0.00019, 0.0003, 0.00035),
stat_col_two.y = c(0, 2, NA, 3, 0.0002, 0.00019, 0.0003, 0.00035),
uuid = letters[1:8]
)
actual_results <- review_variables(test_numeric_2_var,
columns_to_review = c("stat_col_one.x", "stat_col_two.x"),
columns_to_compare_with = c("stat_col_one.y", "stat_col_two.y")
)