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

  1.     
  2.     _C_u_m_u_l_a_t_i_v_e _S_u_m_s, _P_r_o_d_u_c_t_s, _e_t_c.
  3.     
  4.          cumsum(x)
  5.          cumprod(x)
  6.          cummax(x)
  7.          cummin(x)
  8.     
  9.     _V_a_l_u_e:
  10.     
  11.          A vector with the same length of x, but whose elements
  12.          are the cumulative sums, products, minima or maxima of
  13.          those in x.  An NA value in x will the corresponding
  14.          and following elements of the value to be NA.
  15.     
  16.     _E_x_a_m_p_l_e_s:
  17.     
  18.          cumsum(1:10)
  19.          cumprod(1:10)
  20.          cummin(c(3:1,2:0,4:2))
  21.          cummax(c(3:1,2:0,4:2))
  22.     
  23.