cite_articles: Generate simple citation strings from metadata

cite_articlesR Documentation

Generate simple citation strings from metadata

Description

Given a metadata frame, return a character vector of citations.

Usage

cite_articles(metadata)

Arguments

metadata

data frame (from e.g. read_dfr_metadata). Often you will want to row-subscript the metadata.

Details

The generated citations are meant for quick reference, not formal use. They do not handle quotations within quotations correctly and make no effort to scrub the cruft found in some journals' metadata on JSTOR. Author fields, whether designating one author or multiple, are left as is.

Value

a character vector of citations

Examples


md <- dplyr::data_frame(
    id="10.2307/432680",
    doi="10.2307/432680",
    title="Sidney's \"Arcadia\" and \"The Tryall of Chevalry\"",
    author='C. R. Baskervill',
    journaltitle="Modern Philology",
    volume=10,
    issue=2,
    pubdate=as.Date("1912-10-01"),
    pagerange="pp. 197-201",
    publisher="The University of Chicago Press",
    type="fla",
    reviewed.work=NA,
    abstract=NA)
cite_articles(md)

## Not run: 
# Given a model m with stored document metadata, cite a document by id:
cite_articles(metadata(m)[doc_ids(m) == "10.2307/432680", ])

## End(Not run)


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.