0

I am trying to visualise the "groceries" dataset.

library(arules)
library(arulesViz)
library(datasets)

rules <- apriori(Groceries, parameter = list(supp = 0.001, conf = 0.75))
rules<-sort(rules, decreasing=TRUE,by="confidence")
plot(rules, method="graph", interactive = TRUE, shading = NA)

On running this, I get an error about the igraph package.

Error in igraph::tkplot(g, ..., layout = igraph::layout_(g, control$layout), : tcl/tk library not available

What could be the reason for this error? I have disabled the igraph package, but still get this message. Thanks in advance for your time!

user2762934
  • 2,332
  • 10
  • 33
  • 39
  • Possibly you don't have Tcl/Tk on your system? https://cran.r-project.org/doc/manuals/R-admin.html#Tcl_002fTk – Roland Dec 09 '15 at 13:44
  • Thanks for that. I did have Tcl/tk on my system, and just to be on the safer side, I added tcl/tk2 as well. On enabling the libraries however, they wouldn't load. I deleted the tcl/tk library, downloaded the tar.gz file and attempted to manually install it, but that has also failed. – user2762934 Dec 09 '15 at 14:40
  • R includes the `tcltk` package by default, so you might have an unusual R installation. – Gabor Csardi Dec 09 '15 at 20:21
  • Thanks Gabor. Short of re-installing this afresh, is there any solution at all? – user2762934 Dec 09 '15 at 21:50

0 Answers0