Commit 1f155ccd authored by Radford Neal's avatar Radford Neal

Merge branch '88-fixes' into 89

parents eb0ab88a 0b46017a
......@@ -44,6 +44,10 @@
}}
\subsection{BUG FIXES}{
\itemize{
\item Fixed the misleading/ambiguous/incorrect/incomprehensible documentation
on the \code{log}, \code{log.p}, and \code{lower.tail} arguments of
all the density, distribution, and quantile functions for standard
distributions (eg, \code{dgeom}, \code{pgeom}, \code{qgeom}).
\item Fixed a bug involving the "scalar stack" that could affect evaluation
of arithmetic operations when deep recursion has occurred.
}}
......
Fixes immediately after pqR-2018-11-18.
Includes doc fixes for standard distributions.
% File src/library/stats/man/Beta.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2011 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Beta}
......@@ -29,9 +30,12 @@ rbeta(n, shape1, shape2, ncp = 0)
is taken to be the number required.}
\item{shape1, shape2}{positive parameters of the Beta distribution.}
\item{ncp}{non-centrality parameter.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
The Beta distribution with parameters \code{shape1} \eqn{= a} and
......
% File src/library/stats/man/Binomial.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Binomial}
......@@ -28,9 +29,12 @@ rbinom(n, size, prob)
is taken to be the number required.}
\item{size}{number of trials (zero or more).}
\item{prob}{probability of success on each trial.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability. Does not alter the meaning of \code{prob}.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dbinom} gives the density, \code{pbinom} gives the distribution
......
% File src/library/stats/man/Cauchy.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Cauchy}
......@@ -27,9 +28,12 @@ rcauchy(n, location = 0, scale = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{location, scale}{location and scale parameters.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dcauchy}, \code{pcauchy}, and \code{qcauchy} are respectively
......
% File src/library/stats/man/Chisquare.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Chisquare}
......@@ -29,9 +30,12 @@ rchisq(n, df, ncp=0)
is taken to be the number required.}
\item{df}{degrees of freedom (non-negative, but can be non-integer).}
\item{ncp}{non-centrality parameter (non-negative).}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dchisq} gives the density, \code{pchisq} gives the distribution
......
% File src/library/stats/man/Exponential.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Exponential}
......@@ -27,9 +28,12 @@ rexp(n, rate = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{rate}{vector of rates.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dexp} gives the density,
......
% File src/library/stats/man/Fdist.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{FDist}
......@@ -28,9 +29,12 @@ rf(n, df1, df2, ncp)
is taken to be the number required.}
\item{df1, df2}{degrees of freedom. \code{Inf} is allowed.}
\item{ncp}{non-centrality parameter. If omitted the central F is assumed.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{df} gives the density,
......
% File src/library/stats/man/GammaDist.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{GammaDist}
......@@ -32,10 +33,12 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
\item{rate}{an alternative way to specify the scale.}
\item{shape, scale}{shape and scale parameters. Must be positive,
\code{scale} strictly.}
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities \eqn{p}
are returned as \eqn{log(p)}.}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dgamma} gives the density,
......
% File src/library/stats/man/Geometric.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Geometric}
......@@ -27,9 +28,12 @@ rgeom(n, prob)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{prob}{probability of success in each trial. \code{0 < prob <= 1}.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability. Does not alter the meaning of \code{prob}.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
The geometric distribution with \code{prob} \eqn{= p} has density
......
% File src/library/stats/man/Hypergeometric.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Hypergeometric}
......@@ -30,9 +31,12 @@ rhyper(nn, m, n, k)
\item{p}{probability, it must be between 0 and 1.}
\item{nn}{number of observations. If \code{length(nn) > 1}, the length
is taken to be the number required.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dhyper} gives the density,
......
% File src/library/stats/man/Logistic.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Logistic}
......@@ -29,9 +30,12 @@ rlogis(n, location = 0, scale = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{location, scale}{location and scale parameters.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Lognormal.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Lognormal}
......@@ -28,9 +29,12 @@ rlnorm(n, meanlog = 0, sdlog = 1)
is taken to be the number required.}
\item{meanlog, sdlog}{mean and standard deviation of the distribution
on the log scale with default values of \code{0} and \code{1} respectively.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dlnorm} gives the density,
......
% File src/library/stats/man/NegBinomial.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{NegBinomial}
......@@ -32,9 +33,12 @@ rnbinom(n, size, prob, mu)
Must be strictly positive, need not be integer.}
\item{prob}{probability of success in each trial. \code{0 < prob <= 1}.}
\item{mu}{alternative parametrization via mean: see \sQuote{Details}.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability. Does not alter the meaning of \code{prob}.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
The negative binomial distribution with \code{size} \eqn{= n} and
......
% File src/library/stats/man/Normal.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Normal}
......@@ -34,9 +35,12 @@ rnorm(n, mean = 0, sd = 1)
is taken to be the number required.}
\item{mean}{vector of means.}
\item{sd}{vector of standard deviations.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]} otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dnorm} gives the density,
......
% File src/library/stats/man/Poisson.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Poisson}
......@@ -26,9 +27,12 @@ rpois(n, lambda)
\item{p}{vector of probabilities.}
\item{n}{number of random values to return.}
\item{lambda}{vector of (non-negative) means.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dpois} gives the (log) density,
......
% File src/library/stats/man/SignRank.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{SignRank}
......@@ -28,9 +29,12 @@ rsignrank(nn, n)
is taken to be the number required.}
\item{n}{number(s) of observations in the sample(s). A positive
integer, or a vector of such integers.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dsignrank} gives the density,
......
% File src/library/stats/man/TDist.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{TDist}
......@@ -32,9 +33,12 @@ rt(n, df, ncp)
\item{ncp}{non-centrality parameter \eqn{\delta}{delta};
currently except for \code{rt()}, only for \code{abs(ncp) <= 37.62}.
If omitted, use the central t distribution.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dt} gives the density,
......
......@@ -26,7 +26,7 @@ qtukey(p, nmeans, df, nranges = 1, lower.tail = TRUE, log.p = FALSE)
\item{nranges}{number of \emph{groups} whose \bold{maximum} range is
considered.}
\item{log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{lower.tail}{logical; if TRUE (which is the default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
......
% File src/library/stats/man/Uniform.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Uniform}
......@@ -22,9 +23,12 @@ runif(n, min=0, max=1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{min,max}{lower and upper limits of the distribution. Must be finite.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\description{
These functions provide information about the uniform distribution
......
% File src/library/stats/man/Weibull.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Weibull}
......@@ -27,9 +28,12 @@ rweibull(n, shape, scale = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{shape, scale}{shape and scale parameters, the latter defaulting to 1.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dweibull} gives the density,
......
% File src/library/stats/man/Wilcoxon.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Wilcoxon}
......@@ -28,9 +29,12 @@ rwilcox(nn, m, n)
is taken to be the number required.}
\item{m, n}{numbers of observations in the first and second sample,
respectively. Can be vectors of positive integers.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (which is the default), tail probabilities
are \eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
\code{dwilcox} gives the density,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment