compare_df | R Documentation |
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.
compare_df(x, y, key, ...)
## S4 method for signature 'data.frame,data.frame,character'
compare_df(x, y, key, ...)
## S4 method for signature 'lib_df,lib_df,missing'
compare_df(x, y, key, ...)
x |
The (old) reference data frame. |
y |
The updated (new) data frame. |
key |
A character value with the name of the variable used as primary key in the tables. |
... |
Further arguments passed among methods. |
A S3 object of class comp_df, which can be printed in the console by
print()
.
update()
, lib_df, comp_df
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.