unique                package:arules                R Documentation

_R_e_m_o_v_e _D_u_p_l_i_c_a_t_e_d _E_l_e_m_e_n_t_s _f_r_o_m _a _C_o_l_l_e_c_t_i_o_n

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

     Provides the generic function 'unique'   and the S4 methods for
     'itemMatrix'.  'unique' uses 'duplicated' to return an
     'itemMatrix' with the duplicate elements removed.

     Note that 'unique' can also be used on collections of 
     'associations'.

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

     unique(x, incomparables = FALSE, ...)

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

       x: an object of class 'itemMatrix' or associations. 

     ...: further arguments (currently unused). 

incomparables: currently unused.

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

     An object of the same class as 'x' with duplicated elements
     removed.

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

     'duplicated', 'associations-class', 'itemMatrix-class'

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

     data("Adult")

     r1 <- apriori(Adult[1:1000], parameter = list(support = 0.5))
     r2 <- apriori(Adult[1001:2000], parameter = list(support = 0.5))

     ## Note that this produces a collection of rules from two sets
     r_comb <- c(r1, r2)
     r_comb <- unique(r_comb)
     r_comb

