Learn R Programming

matriz (version 1.0.1)

format_batch_ama_citation: Format Multiple BibTeX Entries to AMA Citation Style

Description

Processes multiple BibTeX entries and converts them to AMA (American Medical Association) citation format. Handles article, book, and miscellaneous entry types.

Usage

format_batch_ama_citation(bibtex_entries)

Value

If given a single entry, returns a single citation object. If given multiple entries, returns a list of citation objects. Each object is of class c("bibentry", "character", "citation") containing:

string

The original BibTeX entry

year

The publication year as numeric

citation

The formatted AMA citation string

keywords

A vector of keywords

Arguments

bibtex_entries

A character vector containing one or more BibTeX entries

Examples

Run this code
entries <- c(
  "@article{key1,
    author = {Smith J},
    title = {First Example},
    journal = {Journal One},
    year = {2024}
  }",
  "@book{key2,
    author = {Jones K},
    title = {Second Example},
    publisher = {Publisher},
    year = {2024}
  }"
)
citations <- format_batch_ama_citation(entries)

Run the code above in your browser using DataLab