本文介紹了將傳單輸出保存為 html的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
限時(shí)送ChatGPT賬號..
我正在使用 RStudio 創(chuàng)建一些傳單圖像.
I am using RStudio to create some some leaflet images.
我希望能夠?qū)⑤敵霰4鏋?HTML,以便可以通過電子郵件發(fā)送,其他人也可以查看.
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 代碼,用于創(chuàng)建示例傳單圖像.
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")
似乎適用于大多數(shù)小部件.
seems to work on most widgets.
這篇關(guān)于將傳單輸出保存為 html的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!