home *** CD-ROM | disk | FTP | other *** search
-
- _O_b_j_e_c_t _A_t_t_r_i_b_u_t_e_s
-
- attr(obj, which)
- attr(obj, which) <- value
-
- _A_r_g_u_m_e_n_t_s:
-
- obj : an object whose attributes are to be
- accessed.
-
- which : a character string specifying which attribute
- is to be accessed.
-
- _V_a_l_u_e:
-
- This function provides access to a single object attri-
- bute. The simple form above returns the value of the
- named attribute. The assignment form causes the named
- attribute to take the value on the right of the assign-
- ment symbol.
-
- _S_e_e _A_l_s_o:
-
- attributes
-
- _E_x_a_m_p_l_e_s:
-
- # create a 2 by 5 matrix
- x <- 1:10
- attr(x,"dim") <- c(2,5)
-
-