3
votes

I have given the code that the rules are generated.I would like to create an item frequency histogram plot but ıt didn't work.

library(arules)
library(arulesViz)
library(rattle)

x <- read.table("C:/Users/toshıba pc/Desktop/Kitap2.csv", header = TRUE, sep = ";")
y <- as.matrix(x)

rules <- apriori(y, parameter = list(supp = 0.1, conf = 0.8))

itemFrequencyPlot(rules, support = 0.1, cex.names = 0.8)

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘itemFrequencyPlot’ for signature ‘"rules"’

1

1 Answers

5
votes

itemFrequencyPlot is not defined for rules. You can use

itemFrequencyPlot(items(rules))

to get the frequency of the items in the rules, but I am not sure that this will give you the results you want.