The R Project SVN R

Rev

Rev 71173 | Rev 84045 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71173 Rev 72478
Line 1... Line 1...
1
% File src/library/utils/man/citation.Rd
1
% File src/library/utils/man/citation.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2014 R Core Team
3
% Copyright 1995-2017 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{citation}
6
\name{citation}
7
\alias{CITATION}
7
\alias{CITATION}
8
\alias{citation}
8
\alias{citation}
Line 86... Line 86...
86
 
86
 
87
  \code{readCitationFile} makes use of the \code{Encoding} element (if
87
  \code{readCitationFile} makes use of the \code{Encoding} element (if
88
  any) of \code{meta} to determine the encoding of the file.
88
  any) of \code{meta} to determine the encoding of the file.
89
}
89
}
90
\value{
90
\value{
-
 
91
  An object of class \code{"citation"}, inheriting from class
-
 
92
  \code{"\link{bibentry}"}; see there, notably for the
91
  An object inheriting from class \code{"\link{bibentry}"}.
93
  \code{\link{print}} and \code{\link{format}} methods.
92
}
94
}
93
\seealso{
95
\seealso{
94
  \code{\link{bibentry}}
96
  \code{\link{bibentry}}
95
}
97
}
96
\keyword{misc}
98
\keyword{misc}
Line 103... Line 105...
103
if(nchar(system.file(package = "foreign"))) citation("foreign")
105
if(nchar(system.file(package = "foreign"))) citation("foreign")
104
 
106
 
105
## extract the bibtex entry from the return value
107
## extract the bibtex entry from the return value
106
x <- citation()
108
x <- citation()
107
toBibtex(x)
109
toBibtex(x)
-
 
110
 
-
 
111
\donttest{
-
 
112
## A citation with more than one bibentry:
-
 
113
cm <- tryCatch(citation("mgcv"),
-
 
114
               error = function(e) {
-
 
115
                 warning("Recommended package 'mgcv' is not installed properly")
-
 
116
                 stop(e$message) })
-
 
117
cm # short entries (2-3 lines each)
-
 
118
print(cm, bibtex = TRUE) # each showing its bibtex code
-
 
119
}%dont
108
}
120
}