

interaction {base}                           R Documentation

_C_o_m_p_u_t_e _F_a_c_t_o_r _I_n_t_e_r_a_c_t_i_o_n_s

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

     `interaction' computes a factor which represents the
     interaction of the given factors.  The result of
     `interaction' is always unordered.

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

     interaction(..., drop=FALSE)

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

     ...: The factors for which interaction is to be com-
          puted.

    drop: If `drop' is `TRUE', empty factor levels are
          dropped from the result. The default is to retain
          all factor levels.

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

     A factor which represents the interaction of the given
     factors.

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

     `factor'.

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

     a <- gl(2, 2, 8)
     b <- gl(2, 4, 8)
     interaction(a, b)

