Qaiser iqbal
Qaiser iqbal

Reputation: 306

How to convert arulesViz plot to htmlwidget in R

We are using aluresViz package of R. This package provide a function plot(). the function has argument interactive = TRUE ,which make it interactive so we want to convert this interactive into html widget .Here we use this method..it not working.

htmlwidgets::saveWidget(p, plotlyoutput, selfcontained = FALSE)

Example: as a image it work enter image description here

Upvotes: 1

Views: 808

Answers (1)

Prasanna Nandakumar
Prasanna Nandakumar

Reputation: 4335

# save a plot as a html page
p <- plotly_arules(rules)
htmlwidgets::saveWidget(p, "arules.html", selfcontained = FALSE)
browseURL("arules.html")

# interactive matrix visualization
plotly_arules(rules, method = "matrix")

Upvotes: 2

Related Questions