Rev 30915 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{citEntry}\title{Writing Package CITATION Files}\alias{citEntry}\alias{CITATION}\alias{citHeader}\alias{citFooter}\alias{readCitationFile}\description{The \file{CITATION} file of R packages contains an annotated list ofreferences that should be used for citing the packages.}\usage{citEntry(entry, textVersion, header = NULL, footer = NULL, ...)citHeader(...)citFooter(...)readCitationFile(file)}\arguments{\item{entry}{a character string with a BibTeX entry type}\item{textVersion}{a character string with a text representation ofthe reference}\item{header}{a character string with optional header text}\item{footer}{a character string with optional footer text}\item{file}{a file name}\item{\dots}{see details below}}\details{The \file{CITATION} file of an R package should be placed in the\file{inst} subdirectory of the package source. The file is an Rsource file and may contain arbitrary R commands includingconditionals and computations. The file is \code{source()}ed by the Rparser in a temporary environment and all resulting objects of class\code{"citation"} (the return value of \code{citEntry}) are collected.Typically the file will contain zero or more calls to \code{citHeader},then one or more calls to \code{citEntry}, and finally zero or morecalls to \code{citFooter}. \code{citHeader} and \code{citFooter} aresimply wrappers to \code{\link{paste}}, and their \code{\dots} argumentis passed on to \code{\link{paste}} as is.}\section{Entry Types}{\code{citEntry} creates \code{"citation"} objects, which are modeledafter BibTeX entries. The entry should be a valid BibTeX entry type,e.g.,\describe{\item{article:}{An article from a journal or magazine.}\item{book:}{A book with an explicit publisher.}\item{inbook:}{A part of a book, which may be a chapter (or sectionor whatever) and/or a range of pages.}\item{incollection:}{A part of a book having its own title.}\item{inproceedings:}{An article in a conference proceedings.}\item{manual:}{Technical documentation like a software manual.}\item{mastersthesis:}{A Master's thesis.}\item{misc:}{Use this type when nothing else fits.}\item{phdthesis:}{A PhD thesis.}\item{proceedings:}{The proceedings of a conference.}\item{techreport:}{A report published by a school or otherinstitution, usually numbered within a series.}\item{unpublished:}{A document having an author and title, but notformally published.}}}\section{Entry Fields}{The \code{\dots} argument of \code{citEntry} can be any number ofBibTeX fields, including\describe{\item{address:}{The address of the publisher or other type ofinstitution.}\item{author:}{The name(s) of the author(s), eitheras a character string in the format described in the LaTeX book,or a \code{\link{personList}} object.}\item{booktitle:}{Title of a book, part of which is being cited.}\item{chapter:}{A chapter (or section or whatever) number.}\item{editor:}{Name(s) of editor(s), same format as \code{author}.}\item{institution:}{The publishing institution of a technical report.}\item{journal:}{A journal name.}\item{note:}{Any additional information that can help the reader.The first word should be capitalized.}\item{number:}{The number of a journal, magazine, technical report,or of a work in a series.}\item{pages:}{One or more page numbers or range of numbers.}\item{publisher:}{The publisher's name.}\item{school:}{The name of the school where a thesis was written.}\item{series:}{The name of a series or set of books.}\item{title:}{The work's title.}\item{volume:}{The volume of a journal or multi-volume book.}\item{year:}{The year of publication.}}}\value{\code{citEntry} returns an object of class \code{"citation"},\code{readCitationFile} returns an object of class \code{"citationList"}.}\keyword{misc}\examples{basecit <- system.file("CITATION", package="base")source(basecit, echo=TRUE)readCitationFile(basecit)}