home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / rep < prev    next >
Encoding:
Text File  |  1997-04-23  |  788 b   |  30 lines

  1.     
  2.     _R_e_p_l_i_c_a_t_e _E_l_e_m_e_n_t_s
  3.     
  4.          rep(x, times, length.out)
  5.     
  6.     _D_e_s_c_r_i_p_t_i_o_n:
  7.     
  8.          rep replicates the values in x according to the values
  9.          given in times and length.out.
  10.     
  11.          If times consists of a single integer, the result con-
  12.          sists of the values in x repeated this many times.  If
  13.          times is a vector of the same length as x, the result
  14.          consists of x[1] repeated times[1] times, x[2] repeated
  15.          times[2] times and so on.
  16.     
  17.          length.out may be given in place of times, in which
  18.          case x is repeated as many times as is necessary to
  19.          create a vector of this length.
  20.     
  21.     _S_e_e _A_l_s_o:
  22.     
  23.          seq, sequence.
  24.     
  25.     _E_x_a_m_p_l_e_s:
  26.     
  27.          rep(1:4,2)
  28.          rep(1:4,c(2,2,2,2))
  29.     
  30.