[-methods               package:arules               R Documentation

_M_e_t_h_o_d_s _f_o_r "[": _E_x_t_r_a_c_t_i_o_n _o_r _S_u_b_s_e_t_t_i_n_g _i_n _P_a_c_k_a_g_e '_a_r_u_l_e_s'

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

     Methods for '"["', i.e., extraction or subsetting in package
     'arules'. Subsetting can be done by integers containing column/row
     numbers, vectors of logicals or strings containing parts of item
     labels.

_M_e_t_h_o_d_s:

     [ 'signature(x = "itemMatrix", i = "ANY", j = "ANY", drop=
          "ANY")';  extracts parts of an 'itemMatrix'.   The first
          argument selects rows (e.g., transactions or rules)  and the
          second argument selects columns (items). Either argument can
          be omitted to select all rows or columns.

     [ 'signature(x = "itemsets", i = "ANY", j = "ANY", drop= "ANY")';
          extracts a subset of itemsets and the associated quality
          measures.   'j' has to be missing. 

     [ 'signature(x = "rules", i = "ANY", j = "ANY", drop= "ANY")';
          extracts a subset of rules and the associated quality
          measures. 'j' has to be missing. 

     [ 'signature(x = "transactions", i = "ANY", j = "ANY", drop=
          "ANY")'; extracts a subset of transactions/items from a
          transactions object (a binary incidence matrix).  'i' and 'j'
           can be numeric where 'i' selects transactions and  'j'
          selects items. 

     [ 'signature(x = "tidLists", i = "ANY", j = "ANY", drop= "ANY")';
          extracts parts (transaction ID vectors) from 'tidLists'. 'i'
          selects the items or itemsets  and 'j' selects transactions
          in the lists.

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

     'itemMatrix-class', 'itemsets-class', 'rules-class',
     'transactions-class', 'tidLists-class'

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

     data(Adult)
     Adult

     ## select first 10 transactions
     Adult[1:10]

     ## select first 10 items for first 100 transactions
     Adult[1:100, 1:10]

     ## select the first 100 transactions for the items containing
     ## "income" or "age=Young" in their labels 
     Adult[1:100, c("income=small", "income=large" ,"age=Young")]

