Why does my Rstudio always show "Unknown layout"?

Here is an example. (I need these four packages so I library them.)


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.


This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.