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 / Control < prev    next >
Encoding:
Text File  |  1997-04-23  |  516 b   |  26 lines

  1.     
  2.     _C_o_n_t_r_o_l _F_l_o_w
  3.     
  4.          if(cond) expr
  5.          if(cond) cons.expr  else  alt.expr
  6.          for(var in seq) expr
  7.          while(cond) expr
  8.          repeat expr
  9.          break
  10.          next
  11.     
  12.     _D_e_s_c_r_i_p_t_i_o_n:
  13.     
  14.          These are the basic control-flow constructs of the R
  15.          language.  They function in much the same way as con-
  16.          trol statements in any algol-like language.
  17.     
  18.     _S_e_e _A_l_s_o:
  19.     
  20.          ifelse, switch.
  21.     
  22.     _E_x_a_m_p_l_e_s:
  23.     
  24.          for(i in 1:5) print(1:i)
  25.     
  26.