Why does my Rstudio always show "Unknown layout"?

129 Views Asked by At

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 the wrong is since I can perfectly run these codes on R code online website.

Any one can help me? I appreciate it.

PS: Here is an example that these codes were published online and seems it works. So, it's really weird that my RStudio shows errors.

https://rpubs.com/josezuniga/388416

0

There are 0 best solutions below