Title: | Revise and Reformat Plain Text Bibliographies |
---|---|
Description: | Revise and reformat reference lists (bibliographies) in plain text format. From a reference list as plain text, biblioformat attempts to retrieve DOIs and metadata from Crossref, and reformat them according to a chosen style (e.g. BibTeX, or following a particular journal citation style). |
Authors: | Francisco Rodriguez-Sanchez [aut, cre] |
Maintainer: | Francisco Rodriguez-Sanchez <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.3 |
Built: | 2025-01-01 06:38:31 UTC |
Source: | https://github.com/Pakillo/biblioformat |
Revise and reformat a list of references provided as plain text. This function will try to identify their DOI (through Crossref), then formatting each following the chosen output format (e.g. BibTeX, or a particular journal style).
biblioformat( refs = NULL, output = c("text", "data.frame"), format = c("text", "bibtex"), style = "apa", filename = NULL, ... )
biblioformat( refs = NULL, output = c("text", "data.frame"), format = c("text", "bibtex"), style = "apa", filename = NULL, ... )
refs |
A character vector with bibliographic references. If NULL (default), will read them from the clipboard. |
output |
Return references as plain text (output = "text") or as a data.frame (output = "data.frame") |
format |
Reference format. Either "text" (default) or "bibtex" that can e.g. be later imported in a reference manager |
style |
Output style for bibliography when |
filename |
Optional. Save formatted bibliography to a text file. |
... |
Further arguments for |
If output = "text", a character vector with revised and reformatted bibliographic references. These are automatically copied to the clipboard, so they can be directly pasted onto a document. Optionally, if filename is provided, a text file is also saved on disk. If output = "data.frame" a data.frame is returned with the input references, identified DOI, and resulting citation metatada.
Some references may be changed and erroneously confounded with others. Please check the output reference list.
## Not run: refs <- c( "Hansen et al. (2013) Climate sensitivity, sea level and atmospheric carbon dioxide", "Davis, M.B. and Shaw, R.G. (2001) Science 292(5517): 673-679" ) biblioformat(refs) biblioformat(refs, style = "ecology-letters") biblioformat(refs, format = "bibtex", filename = "myrefs.bib") biblioformat(refs, format = "data.frame") ## End(Not run)
## Not run: refs <- c( "Hansen et al. (2013) Climate sensitivity, sea level and atmospheric carbon dioxide", "Davis, M.B. and Shaw, R.G. (2001) Science 292(5517): 673-679" ) biblioformat(refs) biblioformat(refs, style = "ecology-letters") biblioformat(refs, format = "bibtex", filename = "myrefs.bib") biblioformat(refs, format = "data.frame") ## End(Not run)