本文介紹了將傳單輸出保存為 html的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我正在使用 RStudio 創建一些傳單圖像.
I am using RStudio to create some some leaflet images.
我希望能夠將輸出保存為 HTML,以便可以通過電子郵件發送,其他人也可以查看.
I would like to be able to save the output as an HTML so that it can be emailed and others can view it.
以下是從 [此處] 獲取的一些示例 R 代碼,用于創建示例傳單圖像.
Below is some sample R code which was taken from [here] to create a sample leaflet image.
devtools::install_github('rstudio/leaflet')
library(leaflet)
rand_lng = function(n = 10) rnorm(n, -93.65, .01)
rand_lat = function(n = 10) rnorm(n, 42.0285, .01)
m = leaflet() %>% addTiles() %>% addCircles(rand_lng(50), rand_lat(50), radius = runif(50, 10, 200))
m
任何能夠輸出為 HTML 的代碼將不勝感激...
Any code to be able to the output as HTML would be much appreciated...
推薦答案
類似:
library(htmlwidgets)
saveWidget(m, file="m.html")
似乎適用于大多數小部件.
seems to work on most widgets.
這篇關于將傳單輸出保存為 html的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!