Skip to content

Commit c4b2889

Browse files
author
hornik
committed
Auto-generate citations and references.
git-svn-id: https://svn.r-project.org/R/trunk@88500 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 8e04964 commit c4b2889

File tree

3 files changed

+52
-205
lines changed

3 files changed

+52
-205
lines changed

src/library/base/man/Random.Rd

Lines changed: 36 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/base/man/Random.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2024 R Core Team
3+
% Copyright 1995-2025 R Core Team
44
% Distributed under GPL 2 or later
55

66
\name{Random}
@@ -65,14 +65,16 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
6565
30323)}.
6666
The \I{Wichmann}--\I{Hill} generator has a cycle length of
6767
\eqn{6.9536 \times 10^{12}}{6.9536e12} (=
68-
\code{prod(p-1)/4}, see \emph{Applied Statistics} (1984)
69-
\bold{33}, 123 which corrects the original article).
68+
\code{prod(p-1)/4}, see
69+
\bibcitet{R:Wichmann+Hill:1984}
70+
which corrects the original article).
7071
It exhibits 12 clear failures in the \I{TestU01} Crush suite and 22
71-
in the \I{BigCrush} suite (\bibcite{L'Ecuyer, 2007}).}
72+
in the \I{BigCrush} suite \bibcitep{R:L_Ecuyer+Simard:2007}.}
7273
7374
\item{\code{"Marsaglia-Multicarry"}:}{
7475
A \emph{multiply-with-carry} RNG is used, as recommended by George
75-
\I{Marsaglia} in his post to the mailing list \file{sci.stat.math}.
76+
\I{Marsaglia} in his post to the mailing list \file{sci.stat.math}
77+
\bibcitep{R:Marsaglia:1997}.
7678
It has a period of more than \eqn{2^{60}}{2^60}.
7779
7880
It exhibits 40 clear failures in \I{L'Ecuyer}'s \I{TestU01} Crush suite.
@@ -89,17 +91,17 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
8991
4.6*10^18} for most initial seeds. The seed is two integers (all
9092
values allowed for the first seed: the second must be odd).
9193
92-
We use the implementation by Reeds \abbr{et al.}\sspace(1982--84).
94+
We use the implementation by \bibcitet{R:Reeds+Hubert+Abrahams:1982-4}.
9395
9496
The two seeds are the \I{Tausworthe} and congruence long integers,
9597
respectively.
9698
9799
It exhibits 25 clear failures in the \I{TestU01} Crush suite
98-
(\bibcite{L'Ecuyer, 2007}).
100+
\bibcitep{R:L_Ecuyer+Simard:2007}.
99101
}
100102
101103
\item{\code{"Mersenne-Twister"}:}{
102-
From \bibcite{Matsumoto and Nishimura (1998)}; code updated in 2002.
104+
From \bibcitet{R:Matsumoto+Nishimura:1998}; code updated in 2002.
103105
A twisted \abbr{GFSR} with period
104106
\eqn{2^{19937} - 1}{2^19937 - 1} and equidistribution in 623
105107
consecutive dimensions (over the whole period). The \sQuote{seed} is a
@@ -110,8 +112,8 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
110112
not affected by the initialization issue in the 1998 code of
111113
\I{Matsumoto} and \I{Nishimura} addressed in a 2002 update.
112114
113-
It exhibits 2 clear failures in each of the \I{TestU01} Crush and the
114-
\I{BigCrush} suite (\bibcite{L'Ecuyer, 2007}).
115+
It exhibits 2 clear failures in each of the \I{TestU01} Crush and
116+
the \I{BigCrush} suite \bibcitep{R:L_Ecuyer+Simard:2007}.
115117
}
116118
117119
\item{\code{"Knuth-TAOCP-2002"}:}{
@@ -125,7 +127,7 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
125127
}
126128
127129
\item{\code{"Knuth-TAOCP"}:}{
128-
An earlier version from Knuth (1997).
130+
An earlier version from \bibcitet{R:Knuth:1997}.
129131
130132
The 2002 version was not backwards compatible with the earlier
131133
version: the initialization of the \abbr{GFSR} from the seed was altered.
@@ -139,14 +141,11 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
139141
140142
It exhibits 3 clear failure in the \I{TestU01} Crush suite and
141143
4 clear failures in the \I{BigCrush} suite
142-
(\emph{\I{L'Ecuyer}}, 2007).
144+
\bibcitep{R:L_Ecuyer+Simard:2007}.
143145
}
144146
\item{\code{"L'Ecuyer-CMRG"}:}{
145147
A \sQuote{combined multiple-recursive generator} from
146-
%% <FIXME: bibcite>
147-
%% \I{L'Ecuyer} (1999),
148148
\bibcitet{R:L_Ecuyer:1999},
149-
%% </FIXME>
150149
each element of which is a feedback multiplicative
151150
generator with three integer elements: thus the seed is a (signed)
152151
integer vector of length 6. The period is around
@@ -161,8 +160,8 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
161160
basis for the multiple streams used in package \pkg{parallel}.
162161
% See \code{\link{RngStream}}.
163162
164-
It exhibits 6 clear failures in each of the \I{TestU01} Crush and the
165-
\I{BigCrush} suite (\emph{\I{L'Ecuyer}}, 2007).
163+
It exhibits 6 clear failures in each of the \I{TestU01} Crush and
164+
the \I{BigCrush} suite \bibcitep{R:L_Ecuyer+Simard:2007}.
166165
}
167166
168167
\item{\code{"user-supplied"}:}{
@@ -255,99 +254,30 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
255254
\code{set.seed} returns \code{NULL}, invisibly.
256255
}
257256
\references{
258-
Ahrens, J. H. and Dieter, U. (1973).
259-
Extensions of Forsythe's method for random sampling from the normal
260-
distribution.
261-
\emph{Mathematics of Computation}, \bold{27}, 927--937.
262-
263-
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988).
264-
\emph{The New S Language}.
265-
Wadsworth & Brooks/Cole.
266-
(\code{set.seed}, storing in \code{.Random.seed}.)
267-
268-
Box, G. E. P. and Muller, M. E. (1958).
269-
A note on the generation of normal random deviates.
270-
\emph{Annals of Mathematical Statistics}, \bold{29}, 610--611.
271-
\doi{10.1214/aoms/1177706645}.
272-
273-
De Matteis, A. and Pagnutti, S. (1993).
274-
Long-range Correlation Analysis of the Wichmann-Hill Random Number
275-
Generator.
276-
\emph{Statistics and Computing}, \bold{3}, 67--70.
277-
\doi{10.1007/BF00153065}.
278-
279-
Kinderman, A. J. and Ramage, J. G. (1976).
280-
Computer generation of normal random variables.
281-
\emph{Journal of the American Statistical Association}, \bold{71},
282-
893--896.
283-
\doi{10.2307/2286857}.
284-
285-
Knuth, D. E. (1997).
286-
\emph{The Art of Computer Programming}.
287-
Volume 2, third edition.\cr
288-
Source code at \url{https://www-cs-faculty.stanford.edu/~knuth/taocp.html}.
289-
290-
Knuth, D. E. (2002).
291-
\emph{The Art of Computer Programming}.
292-
Volume 2, third edition, ninth printing.
293-
294-
\I{L'Ecuyer}, P. (1999).
295-
Good parameters and implementations for combined multiple recursive
296-
random number generators.
297-
\emph{Operations Research}, \bold{47}, 159--164.
298-
\doi{10.1287/opre.47.1.159}.
299-
300-
%% <FIXME bibcite>
301-
%% \I{L'Ecuyer}, P. and Simard, R. (2007).
302-
%% \I{TestU01}: A C Library for Empirical Testing of Random Number Generators
303-
%% \emph{ACM Transactions on Mathematical Software}, \bold{33}, Article 22.
304-
%% \doi{10.1145/1268776.1268777}.
305-
%% \cr The \I{TestU01} C library is available from
306-
%% \url{https://simul.iro.umontreal.ca/testu01/tu01.html} or also
307-
%% \url{https://github.com/umontreal-simul/TestU01-2009}.
308-
%% </FIXME>
309-
310-
%% <FIXME bibcite>
311-
\bibinfo{R:Simard+L_Ecuyer:2007}{footer}{
257+
\bibinfo{R:Becker+Chambers+Wilks:1988}{footer}{
258+
(\\\\\\code{set.seed}, storing in \\\\\\code{.Random.seed}.)}
259+
\bibinfo{R:Knuth:1997}{footer}{
260+
Source code at \\\\\\url{https://www-cs-faculty.stanford.edu/~knuth/taocp.html}.}
261+
\bibinfo{R:L_Ecuyer+Simard:2007}{footer}{
312262
The \\\\\\I{TestU01} C library is available from
313263
\\\\\\url{https://simul.iro.umontreal.ca/testu01/tu01.html} or also
314264
\\\\\\url{https://github.com/umontreal-simul/TestU01-2009}.
315265
}
316-
\bibshow{R:Simard+L_Ecuyer:2007}
317-
%% </FIXME>
318-
319-
Marsaglia, G. (1997).
320-
\emph{A random number generator for C}.
321-
Discussion paper, posting on Usenet newsgroup \code{sci.stat.math} on
322-
September 29, 1997.
323-
324-
Marsaglia, G. and Zaman, A. (1994).
325-
Some portable very-long-period random number generators.
326-
\emph{Computers in Physics}, \bold{8}, 117--121.
327-
\doi{10.1063/1.168514}.
328-
329-
Matsumoto, M. and Nishimura, T. (1998).
330-
Mersenne Twister: A 623-dimensionally equidistributed uniform
331-
pseudo-random number generator,
332-
\emph{ACM Transactions on Modeling and Computer Simulation},
333-
\bold{8}, 3--30.\cr
334-
Source code formerly at \code{http://www.math.keio.ac.jp/~matumoto/emt.html}.\cr
335-
Now see \url{https://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/c-lang.html}.
336-
337-
Reeds, J., Hubert, S. and Abrahams, M. (1982--4).
338-
C implementation of SuperDuper, University of California at Berkeley.
339-
(Personal communication from Jim Reeds to Ross Ihaka.)
340-
341-
Wichmann, B. A. and Hill, I. D. (1982).
342-
Algorithm AS 183: An Efficient and Portable Pseudo-random Number
343-
Generator.
344-
\emph{Applied Statistics}, \bold{31}, 188--190; Remarks:
345-
\bold{34}, 198 and \bold{35}, 89.
346-
\doi{10.2307/2347988}.
347-
348-
%% <FIXME bibcite>
349-
\bibshow{*}
350-
%% </FIXME>
266+
\bibinfo{R:Matsumoto+Nishimura:1998}{footer}{
267+
Source code formerly at \\\\\\code{http://www.math.keio.ac.jp/~matumoto/emt.html}.
268+
Now see \\\\\\url{https://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/c-lang.html}.}
269+
\bibinfo{R:Wichmann+Hill:1982}{note}{Remarks:
270+
\\\\\\bold{34}, 198 and \\\\\\bold{35}, 89.}
271+
272+
\bibshow{*,
273+
R:Ahrens+Dieter:1973,
274+
R:Becker+Chambers+Wilks:1988,
275+
R:Box+Muller:1958,
276+
R:De_Matteis+Pagnutti:1993,
277+
R:Kinderman+Ramage:1976,
278+
R:Knuth:2002,
279+
R:Marsaglia+Zaman:1994,
280+
R:Wichmann+Hill:1982}
351281
}
352282
\author{of RNGkind: Martin Maechler. Current implementation, B. D. Ripley
353283
with modifications by Duncan Murdoch.}

src/library/base/man/sort.Rd

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/base/man/sort.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2022 R Core Team
3+
% Copyright 1995-2025 R Core Team
44
% Distributed under GPL 2 or later
55

66
\name{sort}
@@ -78,20 +78,13 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
7878
are more than 10.) Names are discarded for partial sorting.
7979

8080
Method \code{"shell"} uses Shellsort (an \eqn{O(n^{4/3})} variant from
81-
%% <FIXME bibcite>
82-
%% \bibcite{Sedgewick (1986)}).
83-
\bibcitet{R:Sedgewick:1986}.
84-
%% </FIXME>
85-
If \code{x} has names a stable modification is
81+
\bibcitet{R:Sedgewick:1986}. If \code{x} has names a stable modification is
8682
used, so ties are not reordered. (This only matters if names are
8783
present.)
8884

8985
Method \code{"quick"} uses
90-
%% FIXME bibcite
91-
%% Singleton (1969)'s implementation of \I{Hoare}'s Quicksort method
9286
the implementation of \I{Hoare}'s Quicksort method from
9387
\bibcitet{R:Singleton:1969}
94-
%% </FIXME>
9588
and is only available when \code{x} is
9689
numeric (double or integer) and \code{partial} is \code{NULL}. (For
9790
other types of \code{x} Shellsort is used, silently.) It is normally
@@ -156,10 +149,7 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
156149
\code{\link{order}} if you want the original element numbers.
157150

158151
All attributes are removed from the return value
159-
%% <FIXME bibcite>
160-
%% (see Becker \abbr{et al.}, 1988, p.146)
161152
\bibcitep{|R:Becker+Chambers+Wilks:1988|p.\\\\\\sspace{}146}
162-
%% </FIXME>
163153
except names, which are sorted. (If
164154
\code{partial} is specified even the names are removed.) Note that
165155
this means that the returned value has no class, except for factors
@@ -168,36 +158,7 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
168158
}
169159

170160
\references{
171-
%% <FIXME bibcite>
172161
\bibshow{*, R:Knuth:1998}
173-
%% </FIXME>
174-
175-
%% <FIXME bibcite>
176-
%% Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988).
177-
%% \emph{The New S Language}.
178-
%% Wadsworth & Brooks/Cole.
179-
%% </FIXME>
180-
181-
%% <FIXME bibcite>
182-
%% Knuth, D. E. (1998).
183-
%% \emph{The Art of Computer Programming, Volume 3: Sorting and
184-
%% Searching}, 2nd ed.
185-
%% Addison-Wesley.
186-
%% </FIXME>
187-
188-
%% <FIXME bibcite>
189-
%% Sedgewick, R. (1986).
190-
%% A new upper bound for Shellsort.
191-
%% \emph{Journal of Algorithms}, \bold{7}, 159--173.
192-
%% \doi{10.1016/0196-6774(86)90001-5}.
193-
%% </FIXME>
194-
195-
%% <FIXME bibcite>
196-
%% Singleton, R. C. (1969).
197-
%% Algorithm 347: an efficient algorithm for sorting with minimal storage.
198-
%% \emph{Communications of the ACM}, \bold{12}, 185--186.
199-
%% \doi{10.1145/362875.362901}.
200-
%% </FIXME>
201162
}
202163
\seealso{
203164
\sQuote{\link{Comparison}} for how character strings are collated.

src/library/stats/man/fisher.test.Rd

Lines changed: 14 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/stats/man/fisher.test.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2024 R Core Team
3+
% Copyright 1995-2025 R Core Team
44
% Distributed under GPL 2 or later
55

66
\name{fisher.test}
@@ -87,8 +87,8 @@ fisher.test(x, y = NULL, workspace = 200000, hybrid = FALSE,
8787
using the (central or non-central) hypergeometric
8888
distribution. Otherwise, computations are based on a C version of the
8989
FORTRAN subroutine \code{FEXACT} which implements the network developed by
90-
\bibcite{Mehta and Patel (1983, 1986)} and improved by
91-
\bibcite{Clarkson, Fan and Joe (1993)}.
90+
\bibcitet{R:Mehta+Patel:1983, R:Patel+Mehta:1986} and improved by
91+
\bibcitet{R:Clarkson+Joe+Fan:1993}.
9292
The FORTRAN code can be obtained from
9393
\url{https://netlib.org/toms/643}. Note this fails (with an error
9494
message) when the entries of the table are too large. (It transposes
@@ -101,11 +101,11 @@ fisher.test(x, y = NULL, workspace = 200000, hybrid = FALSE,
101101
equals one. \sQuote{Exact} inference can be based on observing that in
102102
general, given all marginal totals fixed, the first element of the
103103
contingency table has a non-central hypergeometric distribution with
104-
non-centrality parameter given by the odds ratio (Fisher, 1935). The
105-
alternative for a one-sided test is based on the odds ratio, so
104+
non-centrality parameter given by the odds ratio \bibcitep{R:Fisher:1935}.
105+
The alternative for a one-sided test is based on the odds ratio, so
106106
\code{alternative = "greater"} is a test of the odds ratio being bigger
107107
than \code{or}.
108-
%
108+
109109
Two-sided tests are based on the probabilities of the tables, and take
110110
as \sQuote{more extreme} all tables with probabilities less than or
111111
equal to that of the observed table, the p-value being the sum of such
@@ -130,62 +130,18 @@ fisher.test(x, y = NULL, workspace = 200000, hybrid = FALSE,
130130
131131
Simulation is done conditional on the row and column marginals, and
132132
works only if the marginals are strictly positive. (A C translation
133-
of the algorithm of \bibcite{Patefield (1981)} is used.)
133+
of the algorithm of \bibcitet{R:Patefield:1981} is used.)
134134
Note that the default number of replicates (\code{B = 2000}) implies a
135135
minimum p-value of about 0.0005 (\eqn{1/(B+1)}).
136136
}
137137
\references{
138-
Agresti, A. (1990).
139-
\emph{Categorical data analysis}.
140-
New York: Wiley.
141-
Pages 59--66.
142-
143-
Agresti, A. (2002).
144-
\emph{Categorical data analysis}. Second edition.
145-
New York: Wiley.
146-
Pages 91--101.
147-
148-
Fisher, R. A. (1935).
149-
The logic of inductive inference.
150-
\emph{Journal of the Royal Statistical Society Series A}, \bold{98},
151-
39--54.
152-
\doi{10.2307/2342435}.
153-
154-
Fisher, R. A. (1962).
155-
Confidence limits for a cross-product ratio.
156-
\emph{Australian Journal of Statistics}, \bold{4}, 41.
157-
\doi{10.1111/j.1467-842X.1962.tb00285.x}.
158-
159-
Fisher, R. A. (1970).
160-
\emph{Statistical Methods for Research Workers}.
161-
Oliver & Boyd.
162-
163-
Mehta, Cyrus R. and Patel, Nitin R. (1983).
164-
A network algorithm for performing Fisher's exact test in \eqn{r
165-
\times c}{r x c} contingency tables.
166-
\emph{Journal of the American Statistical Association}, \bold{78},
167-
427--434.
168-
\doi{10.1080/01621459.1983.10477989}.
169-
170-
Mehta, C. R. and Patel, N. R. (1986).
171-
Algorithm 643: FEXACT, a FORTRAN subroutine for Fisher's exact test
172-
on unordered \eqn{r \times c}{r x c} contingency tables.
173-
\emph{ACM Transactions on Mathematical Software}, \bold{12},
174-
154--161.
175-
\doi{10.1145/6497.214326}.
176-
177-
Clarkson, D. B., Fan, Y. and Joe, H. (1993)
178-
A Remark on Algorithm 643: FEXACT: An Algorithm for Performing
179-
Fisher's Exact Test in \eqn{r \times c}{r x c} Contingency Tables.
180-
\emph{ACM Transactions on Mathematical Software}, \bold{19},
181-
484--488.
182-
\doi{10.1145/168173.168412}.
183-
184-
Patefield, W. M. (1981).
185-
Algorithm AS 159: An efficient method of generating r x c tables
186-
with given row and column totals.
187-
\emph{Applied Statistics}, \bold{30}, 91--97.
188-
\doi{10.2307/2346669}.
138+
\bibinfo{R:Agresti:1990}{note}{pages 59--66}
139+
\bibinfo{R:Agresti:2002}{note}{pages 91--101}
140+
\bibshow{*,
141+
R:Agresti:1990,
142+
R:Agresti:2002,
143+
R:Fisher:1962,
144+
R:Fisher:1970}
189145
}
190146
\seealso{
191147
\code{\link{chisq.test}}

0 commit comments

Comments
 (0)