1

Hi I need help with this. When I put

enter image description here

I got these error.

BUT, I'm trying to plotting it on a knit html document and I want something like this:

enter image description here

What should i pass as a parameter to the plot function???

Vzqivan
  • 341
  • 3
  • 6
  • 15

1 Answers1

1
library(arulesViz)
data("Groceries")
rules <- apriori(Groceries, parameter=list(support=0.001, confidence=0.5))

Adjust the height of your graphics device

f <- function(height) { 
  pdf(tf <- tempfile(fileext = ".pdf"), height = height)  
  plot(rules, method="grouped") 
  dev.off() 
  shell.exec(tf) 
}
f(5)  # too small
f(10) # better height

or try using an interactive plot

sel <- plot(rules, method="grouped", interactive=TRUE)
lukeA
  • 50,755
  • 5
  • 83
  • 91