rdiscunif | R Documentation |
Generate variates from a discrete uniform distribution.
rdiscunif(n, min, max, steps)
n |
The number of points to be simulated. An integer. |
min |
The minimum value of the support of the distribution. |
max |
The maximum value of the support of the distribution. |
steps |
The step size in the support of the distribution i.e. the difference
between consecutive values in the support. Must be positive and a
factor of |
rdiscunif
generates a realisation of n
points of the
discrete uniform distribution with support (min,min+steps,
min+2*steps,...,max)
. If steps
is not a factor of
(max-min)
; or if min > max
then an error is generated.
If min = max
, then rdiscunif(n, min, max,
steps)=repeat(min, n)
.
A length n
numeric vector containing realisations of the specified
uniform distribution.
Tom Lawrence <email:tjlawrence@bigpond.com>
Lawrence, T.J. (2017) Master's Thesis, University of Western Australia.
Uniform
for generating the continuous uniform distribution.
rdiscunif(n=10, min=0, max=5, steps=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.