0

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.

maddy2u
  • 148
  • 1
  • 2
  • 11
  • Could you provide the expected output – The6thSense Jun 01 '15 at 13:45
  • I expect to see d and e with their frequencies plotted if i put bottom two elements mentioned. It should work exactly opposite to the TopN functionality that arules package provides. – maddy2u Jun 01 '15 at 15:36

1 Answers1

1

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))
Michael Hahsler
  • 2,965
  • 1
  • 12
  • 16