| compare_ard | R Documentation |
compare_ard() compares columns of two ARDs row-by-row using a shared set
of key columns. Rows where the column values differ are returned.
The is_ard_equal() function accepts a compare_ard()
object, and returns TRUE or FALSE depending on whether the comparison
reported difference. check_ard_equal() returns as error if not equal.
compare_ard(
x,
y,
keys = c(all_ard_groups(), all_ard_variables(), any_of(c("variable", "variable_level",
"stat_name"))),
columns = any_of(c("stat_label", "stat", "stat_fmt")),
tolerance = sqrt(.Machine$double.eps),
check.attributes = TRUE
)
is_ard_equal(x)
check_ard_equal(x)
x |
( |
y |
( |
keys |
( |
columns |
( |
tolerance |
( |
check.attributes |
( |
a named list of class "ard_comparison" containing:
rows_in_x_not_y: data frame of rows present in x but not in y
(based on key columns)
rows_in_y_not_x: data frame of rows present in y but not in x
(based on key columns)
compare: a named list where each element is a data frame containing
the key columns, the compared column values from both ARDs, and a
difference column with the all.equal() description for rows where
values differ
base <- ard_summary(ADSL, by = ARM, variables = AGE)
compare <- ard_summary(dplyr::mutate(ADSL, AGE = AGE + 1),
by = ARM,
variables = AGE
)
compare_ard(base, compare)$compare$stat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.