Open meghanfrisch opened 3 years ago
Can copy Lancet PDF into a csv, upload two csvs into R, then do something like this:
# create two slightly different dataframes
dt1 <- data.frame(
x = c(1:4),
y = c("a", "b", "c", "d")
)
dt2 <- dt1
dt2$y <- c("a", "b", "j", "k")
# view
print(dt1)
#> x y
#> 1 1 a
#> 2 2 b
#> 3 3 c
#> 4 4 d
print(dt2)
#> x y
#> 1 1 a
#> 2 2 b
#> 3 3 j
#> 4 4 k
# compare
dplyr::anti_join(dt1, dt2)
#> Joining, by = c("x", "y")
#> x y
#> 1 3 c
#> 2 4 d
Does that seem feasible?
Created on 2021-07-16 by the reprex package (v2.0.0)
@hcomfo95 do you know why this would need a separate function?
I've also found waldo::compare
useful for quick comparisons as well https://waldo.r-lib.org/
I think using a function that already exists is fine. The main goal was just to have a quick way to compare the Lancet table to ours instead of having to check each value manually.
Create a function to compare a Lancet pdf table to our submitted table. Used to check for Lancet publication typos without the team manually checking and comparing each value