dunif(x, min=0, max=1, log=F) punif(q, min=0, max=1) qunif(p, min=0, max=1) runif(n, min=0, max=1, bigdata=F)
bdVector
of quantiles.
Missing values (
NA
s) are allowed.
bdVector
of quantiles.
Missing values (
NA
s) are allowed.
bdVector
of probabilities.
Missing values (
NA
s) are allowed.
length(n)
is larger than 1, then
length(n)
random values are returned.
bdVector
of lower limits.
This is replicated to be the same length as
p
or
q
or the number of
deviates generated.
bdVector
of upper limits (greater than lower limits).
This is replicated to be the same length as
p
or
q
or the number of
deviates generated.
TRUE
, an object of type
bdVector
is returned.
Otherwise, a
vector
object is returned. This argument can be used only if the bigdata library section has been loaded.
TRUE
,
dunif
will return
the log of the density, not the density itself.
dunif
),
probability (
punif
),
quantile (
qunif
), or
random sample (
runif
)
for the uniform distribution on the range
min
to
max
.
runif
causes creation of the dataset
.Random.seed
if it does
not already exist, otherwise its value is updated.
Elements of
q
or
p
that are missing will cause the corresponding
elements of the result to be missing.
Missing values are allowed in
min
and
max
but result in
NA
s in the
result and create a warning message.
The uniform (or rectangular) distribution takes values equally likely
from
min
to
max
. The uniform commonly models round-off error among
other uses.
For information on the underlying algorithm the uniform random number generator,
uses, see the
set.seed
help file.
Johnson, N. L. and Kotz, S. (1970). Continuous Univariate Distributions, vol. 2. Houghton-Mifflin, Boston.
x + runif(x) # jitter the x data runif(100, -1, 1) # 100 numbers uniform on --1 to 1