javascript - Hot to save html file only from R and htmlwidgets? -
i using r
draw heatmap. heatmaply
, htmlwidget
installed. fox example exec following code:
library("htmlwidgets") library("heatmaply") heatmaply(mtcars) %>% savewidget(file="test.html")
this generate test.html file , test_files folder, want test.html only. try savewidget(file="test.html",,selfcontained=true)
. place js library in test.html, making test.html big.
use self-contained=false
create plain html , seperate folder, use system
remove folder:
heatmaply(mtcars) %>% savewidget(file="test.html", selfcontained = false) system('rm -r test_files')
just careful don't have folder named x_files, x name of plot output!
Comments
Post a Comment