

attr {base}                                  R Documentation

_O_b_j_e_c_t _A_t_t_r_i_b_u_t_e_s

_U_s_a_g_e_:

     attr(x, which)
     attr(x, which) <- value

_A_r_g_u_m_e_n_t_s_:

       x: 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
     attribute.  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
     assignment 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)

