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

  1.     
  2.     _O_b_j_e_c_t _A_t_t_r_i_b_u_t_e_s
  3.     
  4.          attr(obj, which)
  5.          attr(obj, which) <- value
  6.     
  7.     _A_r_g_u_m_e_n_t_s:
  8.     
  9.              obj : an object whose attributes are to be
  10.                    accessed.
  11.     
  12.            which : a character string specifying which attribute
  13.                    is to be accessed.
  14.     
  15.     _V_a_l_u_e:
  16.     
  17.          This function provides access to a single object attri-
  18.          bute.  The simple form above returns the value of the
  19.          named attribute.  The assignment form causes the named
  20.          attribute to take the value on the right of the assign-
  21.          ment symbol.
  22.     
  23.     _S_e_e _A_l_s_o:
  24.     
  25.          attributes
  26.     
  27.     _E_x_a_m_p_l_e_s:
  28.     
  29.          # create a 2 by 5 matrix
  30.          x <- 1:10
  31.          attr(x,"dim") <- c(2,5)
  32.     
  33.