compare_df: Compare data frames and libraries

compare_dfR Documentation

Compare data frames and libraries

Description

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 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, ...)

Arguments

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.

Value

A S3 object of class comp_df, which can be printed in the console by print().

See Also

update(), lib_df, comp_df

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)

biblio documentation built on June 22, 2024, 9:37 a.m.

Related to compare_df in biblio...