randu                package:datasets                R Documentation

_R_a_n_d_o_m _N_u_m_b_e_r_s _f_r_o_m _C_o_n_g_r_u_e_n_t_i_a_l _G_e_n_e_r_a_t_o_r _R_A_N_D_U

_D_e_s_c_r_i_p_t_i_o_n:

     400 triples of successive random numbers were taken from the VAX
     FORTRAN function RANDU running under VMS 1.5.

_U_s_a_g_e:

     randu

_F_o_r_m_a_t:

     A data frame with 400 observations on 3 variables named 'x', 'y'
     and 'z' which give the first, second and third random number in
     the triple.

_D_e_t_a_i_l_s:

     In three dimensional displays it is evident that the triples fall
     on 15 parallel planes in 3-space. This can be shown theoretically
     to be true for all triples from the RANDU generator.

     These particular 400 triples start 5 apart in the sequence, that
     is they are ((U[5i+1], U[5i+2], U[5i+3]), i= 0, ..., 399), and
     they are rounded to 6 decimal places.

     Under VMS versions 2.0 and higher, this problem has been fixed.

_S_o_u_r_c_e:

     David Donoho

_E_x_a_m_p_l_e_s:

     ## Not run: 
     ## We could re-generate the dataset by the following R code
     seed <- as.double(1)
     RANDU <- function() {
         seed <<- ((2^16 + 3) * seed) %% (2^31)
         seed/(2^31)
     }
     for(i in 1:400) {
         U <- c(RANDU(), RANDU(), RANDU(), RANDU(), RANDU())
         print(round(U[1:3], 6))
     }
     ## End(Not run)

