

Uniform {base}                               R Documentation

_T_h_e _U_n_i_f_o_r_m _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_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_s_a_g_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_r_g_u_m_e_n_t_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_e_e _A_l_s_o_:

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

_E_x_a_m_p_l_e_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]

