sets                 package:arules                 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:

     Provides the generic functions and the S4 methods for the set
     operations 'union',  'intersect', 'setequal',  'setdiff' and
     'is.element' on sets of associations (e.g., rules, itemsets) and
     itemMatrix.

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

     union(x, y)
     intersect(x, y)
     setequal(x, y)
     setdiff(x, y)
     is.element(el, set)

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

x,y, el, set: sets of associations or itemMatrix objects.

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

     All S4 methods for set operations are defined for the  class name
     '"ANY"' in the signature,  so they should work for all S4 classes
     for which the following methods are available: 'match', 'length'
     and 'unique'.

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

     'union', 'intersect', 'setequal' and 'setdiff' return an object of
     the same class as 'x' and 'y'.

     'is.element' returns a logic vector of length 'el' indicating for
     each element if it is included in 'set'.

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

     'associations-class', 'itemMatrix-class'

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

     data("Adult")

     ## mine some rules
     r <- apriori(Adult)

     ## take 2 subsets
     r1 <- r[1:10]
     r2 <- r[6:15]

     union(r1,r2)
     intersect(r1,r2)
     setequal(r1,r2)

