I have to compare two Excel spreadsheets as part of a project at work to determine whether a title has been added to or removed from the second Excel sheet (Book 2). Although the code I wrote is effective, it is also not very aesthetically pleasing and is challenging to understand for someone without any prior knowledge of R.
In order for my coworkers to comprehend and make changes to the differences, I want to compare two Excel files and output the differences in a simple manner. The result should ideally be a table that organizes the data so that it is simple to find and edit. I value all the assistance.
structure(list(Title = c("D", "Mortal Kombat", "Godzilla",
"Wonder", "Suicide Squad", "Mulan"), Studio = c("X", "X",
"X", "X", "X", "Y"), Type = c("Special", "Special", "Special",
"Special", "Special", "Special")), class = c("tbl_df", "tbl",
"data.frame"), row.names = c(NA, -6L))
structure(list(Title = c("D", "Mortal Kombat", "Godzilla",
"Wonder", "Trolls"), Studio = c("X", "X", "X", "X", "X"
), Type = c("Special", "Special", "Special", "Special", "Special"
)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-5L))
library("compareDF")
library("readxl")
dat <- read_xlsx("Book1.xlsx")
dat2 <- read_xlsx("Book2.xlsx")
compare_df(dat, dat2)