2017-08-02 33 views
1

我們使用的是aluresViz包的R.這個包提供了一個函數plot()。該函數的參數interactive = TRUE,它使它交互,所以我們想將這個交互轉換爲html小部件。在這裏我們使用這種方法..它不工作。如何轉換arulesViz圖到htmlwidget中R

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

舉例: 作爲圖像它的工作 enter image description here

回答

2
# 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") 
+0

作品。非常感謝 ! –