Citing R and R Packages in Publications
How to cite Rand Rpackages in publications.
citation(package = "base", lib.loc = NULL, auto = NULL) readCitationFile(file, meta = NULL)
- a character string with the name of a single package. An error occurs if more than one package name is given.
- a character vector with path names of Rlibraries, or
NULL. The default value of
NULLcorresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries.
- a logical indicating whether the default citation
auto-generated from the package
DESCRIPTIONmetadata should be used or not, or
NULL(default), indicating that a
CITATIONfile is used if it exists, or an object of class
"packageDescription"with package metadata (see below).
- a file name.
- a list of package metadata as obtained by
The Rcore development team and the very active community of package authors have invested a lot of time and effort in creating Ras it is today. Please give credit where credit is due and cite Rand Rpackages when you use them for data analysis.
citation() for information on how to cite the
base R system in publications. If the name of a non-base package is
given, the function either returns the information contained in the
In R>= 2.14.0, one can use a Authors@R field in
person object with a refined, machine-readable
description of the package
If only one reference is given, the print method for the object
citation() shows both a text version and a BibTeX
entry for it, if a package has more than one reference then only the
text versions are shown. The BibTeX versions can be obtained using
toBibtex() (see the examples below).
citation() to extract the information in
source()ed by the R
parser in a temporary environment and all resulting bibliographic
objects (specifically, of class
citHeader, then one or more calls to
and finally zero or more calls to
citFooter, where in fact
citFooter are simply wrappers to
paste, with their
... argument passed on to
paste as is. The
makes for improved representation and manipulation of bibliographic
information (in fact, the old mechanism is implemented using the new
one), and one can write
One can include an auto-generated package citation in the
citation(auto = meta).
readCitationFile makes use of the
Encoding element (if
meta to determine the encoding of the file.
- An object inheriting from class
## the basic R reference citation() ## references for a package -- might not have these installed if(nchar(system.file(package = "lattice"))) citation("lattice") if(nchar(system.file(package = "foreign"))) citation("foreign") ## extract the bibtex entry from the return value x <- citation() toBibtex(x)