Here is an example. (I need these four packages so I library them.)
library(arules) library(arulesViz) library(dplyr) library(igraph) data(Groceries) rules <- apriori(Groceries, parameter=list(support=0.005, confidence=0.5)) subrules2 <- sample(rules, 10) plot(subrules2, method="graph", control=list(layout=igraph::in_circle()))
And the Rstudio shows that
> plot(subrules2, method="graph", control=list(layout=igraph::in_circle())) Error: Unknown layout
I do not know what is wrong since I can perfectly run these codes on the R code online website.
Anyone can help me? I appreciate it.
PS: Here is an example: these codes were published online and seem to work. So, it's really weird that my RStudio shows errors.