dims                  package:Zelig                  R Documentation

_R_e_t_u_r_n _D_i_m_e_n_s_i_o_n_s _o_f _V_e_c_t_o_r_s, _A_r_r_a_y_s, _a_n_d _D_a_t_a _F_r_a_m_e_s

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

     Retrieve the dimensions of a vector, array, or data frame.

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

     dims(x)

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

       x: An R object.  For example, a vector, matrix, array, or data 
          frame.

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

     The function 'dims' performs exactly the same as 'dim', and 
     additionally returns the 'length' of vectors (treating them as 
     one-dimensional arrays).

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

     Olivia Lau <olau@fas.harvard.edu>

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

     'dim', 'length'

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

     a <- 1:12
     dims(a)

     a <- matrix(1, nrow = 4, ncol = 9)
     dims(a)

