interaction               package: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 computed.

    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)

