View source: R/cdisc_validate.R
| compare_observations_by_id | R Documentation |
Internal function to match rows between two datasets using specified key variables, then compare values on matched rows. Also identifies unmatched rows in either dataset.
compare_observations_by_id(df1, df2, id_vars, common_cols, tolerance = 0)
df1 |
First data frame (base). |
df2 |
Second data frame (compare). |
id_vars |
Character vector of ID column names. |
common_cols |
Character vector of common column names. |
tolerance |
Numeric tolerance value for floating-point comparisons (default 0). When tolerance > 0, numeric values are considered equal if their absolute difference is within the tolerance threshold. Character and factor columns always use exact matching regardless of tolerance. |
A list with:
observation_comparison |
List with discrepancies and details (same
structure as |
unmatched_rows |
List with df1_only and df2_only data frames |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.