Skip to content

Commit e3cd459

Browse files
author
smeyer
committed
tweak dpqr docs: +cumulative (PR#18916), +/densities, markup
git-svn-id: https://svn.r-project.org/R/trunk@88459 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent b69b656 commit e3cd459

23 files changed

+183
-153
lines changed

src/library/stats/man/Beta.Rd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ rbeta(n, shape1, shape2, ncp = 0)
2929
is taken to be the number required.}
3030
\item{shape1, shape2}{non-negative parameters of the Beta distribution.}
3131
\item{ncp}{non-centrality parameter.}
32-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
33-
\item{lower.tail}{logical; if TRUE (default), probabilities are
32+
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities
33+
are given as logarithms.}
34+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3435
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3536
}
3637
\details{
@@ -67,9 +68,10 @@ rbeta(n, shape1, shape2, ncp = 0)
6768
non-centrality parameter \eqn{\lambda}, see \link{Chisquare}.
6869
}
6970
\value{
70-
\code{dbeta} gives the density, \code{pbeta} the distribution
71-
function, \code{qbeta} the quantile function, and \code{rbeta}
72-
generates random deviates.
71+
\code{dbeta} gives the density,
72+
\code{pbeta} is the cumulative distribution function, and
73+
\code{qbeta} is the quantile function of the Beta distribution.
74+
\code{rbeta} generates random deviates.
7375

7476
Invalid arguments will result in return value \code{NaN}, with a warning.
7577

src/library/stats/man/Binomial.Rd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ rbinom(n, size, prob)
3131
is taken to be the number required.}
3232
\item{size}{number of trials (zero or more).}
3333
\item{prob}{probability of success on each trial.}
34-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
35-
\item{lower.tail}{logical; if TRUE (default), probabilities are
34+
\item{log, log.p}{logical; if \code{TRUE}, probabilities
35+
are given as logarithms.}
36+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3637
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3738
}
3839
\value{
39-
\code{dbinom} gives the density, \code{pbinom} gives the distribution
40-
function, \code{qbinom} gives the quantile function and \code{rbinom}
41-
generates random deviates.
40+
\code{dbinom} gives the density,
41+
\code{pbinom} is the cumulative distribution function, and
42+
\code{qbinom} is the quantile function of the binomial distribution.
43+
\code{rbinom} generates random deviates.
4244

4345
If \code{size} is not an integer, \code{NaN} is returned.
4446

src/library/stats/man/Cauchy.Rd

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,24 @@ rcauchy(n, location = 0, scale = 1)
2727
\item{n}{number of observations. If \code{length(n) > 1}, the length
2828
is taken to be the number required.}
2929
\item{location, scale}{location and scale parameters.}
30-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
31-
\item{lower.tail}{logical; if TRUE (default), probabilities are
30+
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities
31+
are given as logarithms.}
32+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3233
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3334
}
3435
\value{
35-
\code{dcauchy}, \code{pcauchy}, and \code{qcauchy} are respectively
36-
the density, distribution function and quantile function of the Cauchy
37-
distribution. \code{rcauchy} generates random deviates from the
38-
Cauchy.
39-
36+
\code{dcauchy} gives the density,
37+
\code{pcauchy} is the cumulative distribution function, and
38+
\code{qcauchy} is the quantile function of the Cauchy distribution.
39+
\code{rcauchy} generates random deviates.
40+
4041
The length of the result is determined by \code{n} for
4142
\code{rcauchy}, and is the maximum of the lengths of the
42-
numerical arguments for the other functions.
43-
43+
numerical arguments for the other functions.
44+
4445
The numerical arguments other than \code{n} are recycled to the
4546
length of the result. Only the first elements of the logical
46-
arguments are used.
47+
arguments are used.
4748
}
4849
\details{
4950
If \code{location} or \code{scale} are not specified, they assume
@@ -73,7 +74,7 @@ rcauchy(n, location = 0, scale = 1)
7374
}
7475
\seealso{
7576
\link{Distributions} for other standard distributions, including
76-
\code{\link{dt}} for the t distribution which generalizes
77+
\code{\link{dt}} for the \eqn{t} distribution which generalizes
7778
\code{dcauchy(*, l = 0, s = 1)}.
7879
}
7980
\examples{

src/library/stats/man/Chisquare.Rd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,20 @@ rchisq(n, df, ncp = 0)
2929
is taken to be the number required.}
3030
\item{df}{degrees of freedom (non-negative, but can be non-integer).}
3131
\item{ncp}{non-centrality parameter (non-negative).}
32-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
33-
\item{lower.tail}{logical; if TRUE (default), probabilities are
32+
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities
33+
are given as logarithms.}
34+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3435
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}, unless for \code{df=0} and
3536
when \code{ncp} is missing, where the central chi-squared
3637
distribution function is based
3738
on \code{\link{pgamma}()}; in this case, probabilities are
3839
\eqn{P[X < x]} when \code{lower.tail} is true, and \eqn{P[X \ge x]}, otherwise.}
3940
}
4041
\value{
41-
\code{dchisq} gives the density, \code{pchisq} gives the distribution
42-
function, \code{qchisq} gives the quantile function, and \code{rchisq}
43-
generates random deviates.
42+
\code{dchisq} gives the density,
43+
\code{pchisq} is the cumulative distribution function, and
44+
\code{qchisq} is the quantile function of the chi-squared distribution.
45+
\code{rchisq} generates random deviates.
4446

4547
Invalid arguments will result in return value \code{NaN}, with a warning.
4648

src/library/stats/man/Distributions.Rd

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

66
\name{Distributions}
77
\alias{distribution}
88
\alias{distributions}
99
\alias{Distributions}
10-
\title{Distributions in the stats package}
10+
\title{Distributions in the \pkg{stats} Package}
1111
\description{
1212
Density, cumulative distribution function, quantile function and random
1313
variate generation for many standard probability distributions are
@@ -40,6 +40,8 @@
4040

4141
For the log-normal distribution see \code{\link{dlnorm}}.
4242

43+
For the logistic distribution see \code{\link{dlogis}}.
44+
4345
For the multinomial distribution see \code{\link{dmultinom}}.
4446

4547
For the negative binomial distribution see \code{\link{dnbinom}}.
@@ -48,22 +50,22 @@
4850

4951
For the Poisson distribution see \code{\link{dpois}}.
5052

51-
For the Student's t distribution see \code{\link{dt}}.
53+
For the Student's \eqn{t} distribution see \code{\link{dt}}.
5254
5355
For the uniform distribution see \code{\link{dunif}}.
5456
5557
For the Weibull distribution see \code{\link{dweibull}}.
5658
5759
For less common distributions of test statistics see
58-
\code{\link{pbirthday}}, \code{\link{dsignrank}},
60+
\code{\link{pbirthday}}, \code{\link{dsignrank}}, \code{\link{psmirnov}},
5961
\code{\link{ptukey}} and \code{\link{dwilcox}} (and see the
6062
\sQuote{See Also} section of \code{\link{cor.test}}).
6163
}
6264
\seealso{
6365
\code{\link{RNG}} about random number generation in \R.
6466
65-
The CRAN task view on distributions,
67+
The CRAN task view on probability distributions,
6668
\url{https://CRAN.R-project.org/view=Distributions},
67-
mentioning several CRAN packages for additional distributions.
69+
lists \R packages that provide additional distributions.
6870
}
6971
\keyword{distribution}

src/library/stats/man/Exponential.Rd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,21 @@ rexp(n, rate = 1)
2727
\item{n}{number of observations. If \code{length(n) > 1}, the length
2828
is taken to be the number required.}
2929
\item{rate}{vector of rates.}
30-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
31-
\item{lower.tail}{logical; if TRUE (default), probabilities are
30+
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities
31+
are given as logarithms.}
32+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3233
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3334
}
3435
\value{
3536
\code{dexp} gives the density,
36-
\code{pexp} gives the distribution function,
37-
\code{qexp} gives the quantile function, and
37+
\code{pexp} is the cumulative distribution function, and
38+
\code{qexp} is the quantile function of the exponential distribution.
3839
\code{rexp} generates random deviates.
3940

4041
The length of the result is determined by \code{n} for
4142
\code{rexp}, and is the maximum of the lengths of the
42-
numerical arguments for the other functions.
43-
43+
numerical arguments for the other functions.
44+
4445
The numerical arguments other than \code{n} are recycled to the
4546
length of the result. Only the first elements of the logical
4647
arguments are used.

src/library/stats/man/Fdist.Rd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ rf(n, df1, df2, ncp)
2828
is taken to be the number required.}
2929
\item{df1, df2}{degrees of freedom. \code{Inf} is allowed.}
3030
\item{ncp}{non-centrality parameter. If omitted the central F is assumed.}
31-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
32-
\item{lower.tail}{logical; if TRUE (default), probabilities are
31+
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities
32+
are given as logarithms.}
33+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3334
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3435
}
3536
\value{
3637
\code{df} gives the density,
37-
\code{pf} gives the distribution function
38-
\code{qf} gives the quantile function, and
38+
\code{pf} is the cumulative distribution function, and
39+
\code{qf} is the quantile function of the F distribution.
3940
\code{rf} generates random deviates.
4041

4142
Invalid arguments will result in return value \code{NaN}, with a warning.
@@ -115,7 +116,7 @@ rf(n, df1, df2, ncp)
115116
\seealso{
116117
\link{Distributions} for other standard distributions, including
117118
\code{\link{dchisq}} for chi-squared and \code{\link{dt}} for Student's
118-
t distributions.
119+
\eqn{t} distributions.
119120
}
120121
\examples{
121122
## Equivalence of pt(.,nu) with pf(.^2, 1,nu):

src/library/stats/man/GammaDist.Rd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
3232
\item{rate}{an alternative way to specify the scale.}
3333
\item{shape, scale}{shape and scale parameters. Must be positive,
3434
\code{scale} strictly.}
35-
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities \eqn{p}
36-
are returned as \eqn{log(p)}.}
37-
\item{lower.tail}{logical; if TRUE (default), probabilities are
35+
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities
36+
are given as logarithms.}
37+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3838
\eqn{P[X < x]}, otherwise, \eqn{P[X \ge x]} (exceptionally not
3939
\emph{cadlag} here, to ensure, e.g., \code{pgamma(0, shape=0)} remains zero).}
4040
}
4141
\value{
4242
\code{dgamma} gives the density,
43-
\code{pgamma} gives the distribution function,
44-
\code{qgamma} gives the quantile function, and
43+
\code{pgamma} is the cumulative distribution function, and
44+
\code{qgamma} is the quantile function of the Gamma distribution.
4545
\code{rgamma} generates random deviates.
4646

4747
Invalid arguments will result in return value \code{NaN}, with a warning.
@@ -73,7 +73,8 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
7373
7474
The cumulative hazard \eqn{H(t) = - \log(1 - F(t))}{H(t) = - log(1 - F(t))}
7575
is
76-
\preformatted{-pgamma(t, ..., lower = FALSE, log = TRUE)
76+
\preformatted{
77+
-pgamma(t, ..., lower = FALSE, log = TRUE)
7778
}
7879
7980
Note that for smallish values of \code{shape} (and moderate

src/library/stats/man/Geometric.Rd

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ rgeom(n, prob)
2727
\item{n}{number of observations. If \code{length(n) > 1}, the length
2828
is taken to be the number required.}
2929
\item{prob}{probability of success in each trial. \code{0 < prob <= 1}.}
30-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
31-
\item{lower.tail}{logical; if TRUE (default), probabilities are
30+
\item{log, log.p}{logical; if \code{TRUE}, probabilities
31+
are given as logarithms.}
32+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3233
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3334
}
3435
\details{
@@ -44,8 +45,8 @@ rgeom(n, prob)
4445
}
4546
\value{
4647
\code{dgeom} gives the density,
47-
\code{pgeom} gives the distribution function,
48-
\code{qgeom} gives the quantile function, and
48+
\code{pgeom} is the cumulative distribution function, and
49+
\code{qgeom} is the quantile function of the geometric distribution.
4950
\code{rgeom} generates random deviates.
5051

5152
Invalid \code{prob} will result in return value \code{NaN}, with a warning.

src/library/stats/man/Hypergeometric.Rd

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ rhyper(nn, m, n, k)
3131
\item{p}{probability, it must be between 0 and 1.}
3232
\item{nn}{number of observations. If \code{length(nn) > 1}, the length
3333
is taken to be the number required.}
34-
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
35-
\item{lower.tail}{logical; if TRUE (default), probabilities are
34+
\item{log, log.p}{logical; if \code{TRUE}, probabilities
35+
are given as logarithms.}
36+
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
3637
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
3738
}
3839
\value{
3940
\code{dhyper} gives the density,
40-
\code{phyper} gives the distribution function,
41-
\code{qhyper} gives the quantile function, and
41+
\code{phyper} is the cumulative distribution function, and
42+
\code{qhyper} is the quantile function of the hypergeometric distribution.
4243
\code{rhyper} generates random deviates.
4344

4445
Invalid arguments will result in return value \code{NaN}, with a warning.

0 commit comments

Comments
 (0)