You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using comparedf function to cross check two tables which usually contain calculated variables, such as BMI. Because the two tables were built by two different programmers, they could have used different rounding which in this case we might have some differences but they're not really significant - just rounding and decimal differences. I think adding a min.diff and max.diff columns in the diffs.byvar.table table for numeric variables could be really helpful in such cases to show the range of differences, so if the differences are reasonable we can skip otherwise to check the details. I know we can print the whole table by setting the control option and visually check this, but that's time consuming when you have a ton of variables. Following is a visual example of what I'm trying to say. (The example datasets are from admiral.test::admiral_vs package. BMI has been calculated by reshaping the dataset).
Below I tried to implement a solution in a very basic and simple way:
I'm using
comparedf
function to cross check two tables which usually contain calculated variables, such as BMI. Because the two tables were built by two different programmers, they could have used different rounding which in this case we might have some differences but they're not really significant - just rounding and decimal differences. I think adding amin.diff
andmax.diff
columns in thediffs.byvar.table
table for numeric variables could be really helpful in such cases to show the range of differences, so if the differences are reasonable we can skip otherwise to check the details. I know we can print the whole table by setting the control option and visually check this, but that's time consuming when you have a ton of variables. Following is a visual example of what I'm trying to say. (The example datasets are fromadmiral.test::admiral_vs
package. BMI has been calculated by reshaping the dataset).Below I tried to implement a solution in a very basic and simple way:
The text was updated successfully, but these errors were encountered: