CreateStream            package:rlecuyer            R Documentation

_S_p_a_w_n _n_e_w _s_t_r_e_a_m_s

_D_e_s_c_r_i_p_t_i_o_n:

     '.lec.CreateStream' creates new streams of random numbers.

_U_s_a_g_e:

     .lec.CreateStream (names)

_A_r_g_u_m_e_n_t_s:

   names: a character string or a vector of character strings naming
          the streams to be created. The argument must be provided and
          the names must be unique within the set of existing streams.
          If for one 'i' a stream of the name 'names[i]' already
          exists, its state is replaced by the state of the new created
          stream.

_D_e_t_a_i_l_s:

     '.lec.CreateStream' is a wrapper function for the C function
     'RngStream_CreateStream' (L'Ecuyer et al, 2002). The state of the
     created stream returned by the C function is stored in the global
     object '.lec.Random.seed.table'.

_V_a_l_u_e:

     None.

_R_e_f_e_r_e_n_c_e_s:

     P. L'Ecuyer, R. Simard, E.J.Chen and W.D.Kelton: An
     Object-Oriented Random-Number Package With Many Long Streams and
     Substreams; Operations Research, vol. 50, nr. 6, 2002.

_E_x_a_m_p_l_e_s:

     nstreams <- 10       # number of streams
     names <- paste("mystream",1:nstreams,sep="")
     .lec.CreateStream(names)
     .lec.WriteStateFull(names)

