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)

