

   Uniform {base}                               R Documentation

   TThhee UUnniiffoorrmm DDiissttrriibbuuttiioonn

   DDeessccrriippttiioonn::

        These functions provide information about the uniform
        distribution on the interval from `min' to `max'.
        `dunif' gives the density, `punif' gives the distribu-
        tion function `qunif' gives the quantile function and
        `runif' generates random deviates.

   UUssaaggee::

        dunif(x, min=0, max=1)
        punif(q, min=0, max=1)
        qunif(p, min=0, max=1)
        runif(n, min=0, max=1)

   AArrgguummeennttss::

        x,q: vector of quantiles.

          p: vector of probabilities.

          n: number of observations to generate.

    min,max: lower and upper limits of the distribution.

   SSeeee AAllssoo::

        `.Random.seed' about random number generation, `rnorm',
        etc for other distributions.

   EExxaammpplleess::

        u <- runif(20)
        all(punif(u) == u) # T
        all(dunif(u) == 1) # T

        var(runif(10000))#- ~ = 1/12 = .08333
        all(runif(100, 2,2) == 2)#-> TRUE [exhibits bug in R version <= 0.63.1]

