Learn R Programming

revtools (version 0.2.2)

extract_unique_references: Create a de-duplicated data.frame

Description

Take a data.frame of bibliographic information showing potential duplicates (as returned by find_duplicates), and return a data.frame of unique references

Usage

extract_unique_references(x, show_source=FALSE)

Arguments

x

a data.frame as returned by find_duplicates

show_source

If x contains a column named 'source', selecting TRUE will cause the output to contain extra columns. Specifically, each added column will be named for a unique value of x$source, and each row will list the source(s) that contained that reference. Defaults to FALSE

Value

a data.frame containing basic information for each reference (row)

See Also

find_duplicates.

Examples

Run this code
# NOT RUN {
# import data
file_location<-system.file("extdata", "avian_ecology_bibliography.ris", package="revtools")
x<-as.data.frame(read_bibliography(file_location))

# generate duplicated references (for example purposes)
x_duplicated<-rbind(x, x[1:5,])

# locate and extract unique references
x_check<-find_duplicates(x_duplicated)
x_unique<-extract_unique_references(x_check)
# }

Run the code above in your browser using DataLab