itemFrequencyPlot           package:arules           R Documentation

_P_l_o_t_t_i_n_g _t_h_e _I_t_e_m _F_r_e_q_u_e_n_c_i_e_s _f_o_r _O_b_j_e_c_t_s _B_a_s_e_d _o_n "_i_t_e_m_M_a_t_r_i_x"

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

     Provides the generic function 'itemFrequencyPlot' and the S4
     method  to create an item frequency bar plot for inspecting  the
     item frequency distribution for objects based on 'itemMatrix'
     (e.g., 'transactions', or items in 'itemsets' and  'rules').

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

     itemFrequencyPlot(x, ...)
     ## S4 method for signature 'itemMatrix':
     itemFrequencyPlot(x, type = "relative", cex.names =  par("cex.axis"), ...)

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

       x: the object to be plotted.

     ...: further arguments are passed on (see   'barplot' from
          possible arguments).

    type: indicates whether item frequencies should be displayed 
          relative of absolute.

cex.names: expansion factor for axis names (bar labels).

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

     A numeric vector with the midpoints of the drawn bars; useful for
     adding to the graph.

_A_u_t_h_o_r(_s):

     Michael Hahsler

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

     'itemMatrix-class'

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

     data(Adult_transactions)

     # the following example compares the item frequencies
     # of people with a rage income (boxes) with the average in the data set

     # box plot for young people (first 72 items)
     midpoints <- itemFrequencyPlot(
       Adult_transactions[Adult_transactions %in% "income = large", 1:72])

     # add the item frequency over all transactions (first 72 items)
     lines(midpoints, itemSupport(Adult_transactions[, 1:72]))

