This function saves deduplicated citations as a RIS file with sources, labels and strings included as custom fields (if they were initially provided for any of the citations). Note that existing files are overwritten without warning.
Usage
export_ris(
citations,
filename = "citations.ris",
source_field = "DB",
label_field = "C7",
string_field = "C8"
)
Arguments
- citations
Dataframe with unique citations, resulting from
dedup_citations()
- filename
Name (and path) of file, should end in .ris
- source_field
Character. Which RIS field should cite_sources be saved to? NULL to exclude.
- label_field
Character. Which RIS field should cite_labels be saved to? NULL to exclude.
- string_field
Character. Which RIS field should cite_strings be saved to? NULL to exclude.
Examples
if (interactive()) {
# Load example data from the package
examplecitations_path <- system.file("extdata", "examplecitations.rds", package = "CiteSource")
examplecitations <- readRDS(examplecitations_path)
dedup_results <- dedup_citations(examplecitations, merge_citations = TRUE)
export_ris(dedup_results$unique, "cite_sources.ris", string_field = NULL)
}