dimension                package:R.oo                R Documentation

_G_e_t_s _t_h_e _d_i_m_e_n_s_i_o_n _o_f _t_h_e _o_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Gets the dimension of the object similar to what 'dim()' does, but
     instead of 'NULL' it will return the length of a vector. If a
     function is passed, 'NULL' is returned.

_U_s_a_g_e:

     ## Default S3 method:
     dimension(object, ...)

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

  object: The object for which the dimension should be obtained.

     ...: Not used.

_V_a_l_u_e:

     Returns an 'integer' 'vector' or 'NULL'.

_A_u_t_h_o_r(_s):

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

_S_e_e _A_l_s_o:

     'll.default'(). 'dim'() and 'length'().

_E_x_a_m_p_l_e_s:

       dimension(matrix(1:100, ncol=10))     # 10 10
       dimension(1:14)                       # 14
       dimension(data.frame(a=1:10, b=10:1)) # 10  2
       dimension(print)                      # NULL

