

sets {base}                                  R Documentation

_S_e_t _O_p_e_r_a_t_i_o_n_s

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

     Performs set union, intersection difference and member-
     ship on two vectors.

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

     union(x, y)
     intersect(x, y)
     setdiff(x, y)
     is.element(x, y)

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

    x, y: vectors (of the same type) contain a sequence of
          items with no       duplicated values.

_D_e_t_a_i_l_s_:

     Each of `union', `intersect' and `setdiff' will remove
     any duplicated values in the arguments.

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

     A vector of the same type as `y'.

_A_u_t_h_o_r_(_s_)_:

     B. D. Ripley

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

     x <- sample(1:20, 10)
     y <- sample(3:23, 7)
     union(x, y)
     intersect(x, y)
     setdiff(x, y)
     is.element(y, x)

