

drop {base}                                  R Documentation

_D_r_o_p _R_e_d_u_n_d_a_n_t _E_x_t_e_n_t _I_n_f_o_r_m_a_t_i_o_n

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

     drop(x)

_V_a_l_u_e_:

     If `x' is an object with a `dim' attribute (e.g. a
     matrix or `array'), then `drop' returns an object like
     `x', but with any extents of length one removed.  Any
     accompanying `dimnames' attribute is adjusted and
     returned with `x'.

     Array subsetting (`[') performs this reduction unless
     used with `drop = FALSE', but sometimes it is useful to
     invoke `drop' directly.

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

     `drop1' which is used for dropping terms in models.

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

     dim(drop(array(1:12, dim=c(1,3,1,1,2,1,2))))# = 3 2 2
     drop(1:3 %*% 2:4)# scalar product

