Report on differences between two versions of the same data frame or electronic library. When used for data frames, you need to indicate the variable containing IDs for each entry, while applied to lib_df objects, the variable 'bibtexkey' will be considered as ID per default.
The output printed in the console will advice about added and deleted entries in 'y' as well as any change in the entries common to both versions.
Usage
compare_df(x, y, key, ...)
# S4 method for class 'data.frame,data.frame,character'
compare_df(x, y, key, ...)
# S4 method for class 'lib_df,lib_df,missing'
compare_df(x, y, key, ...)
Examples
# Partially matching libraries
Refs1 <- synopsis[1:10, ]
Refs2 <- synopsis[6:15, ]
# some modification in second library
Refs2[3, "title"] <- "New Title"
# compare libraries
compare_df(Refs1, Refs2)
#> ## deleted entries (5):
#> 'rovira2006' 'luebert2004-2' 'pliscoff2006' 'smith-ramirez2005' 'flores_meza2016'
#>
#> ## added entries (5):
#> 'gajardo1983' 'gajardo1994-2' 'lomolino2010' 'shelford1931' 'austin2013'
#>
#> ## updates in entry 'ramirez1989-6'
#> - old title: Cambios estacionales de frecuencia y cobertura en una pradera del Centro Sur de Chile
#> - new title: New Title
#>