Search code examples
rarulesmarket-basket-analysis

ItemfrequencyPlot - Arules package to show bottom frequency itemsets


I want to see the bottom frequency items in the transaction data, how can i see that?

code:

a_list <- list(
c("a","b","c"),    
c("a","b"),
c("a","b","d"),
c("c","e"),
c("a","b","d","e")
)

trans <- as(a_list, "transactions")

itemFrequencyPlot(trans)

PS: I am integrating this on a shiny platform.


Solution

  • You can use itemFrequency() and then sort or filter the frequencies you like and plot them with barplot().

    R> barplot(sort(itemFrequency(trans), decreasing=TRUE))