0

我想查看交易数据中的最低频率项,如何查看?

代码:

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:我正在将它集成到一个闪亮的平台上。

4

1 回答 1

1

您可以使用itemFrequency()然后对您喜欢的频率进行排序或过滤,并用barplot().

R> barplot(sort(itemFrequency(trans), decreasing=TRUE))
于 2015-08-21T16:44:46.533 回答