biblioformat | R Documentation |
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,
...
)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.