【发布时间】:2017-10-16 12:26:37
【问题描述】:
当我尝试通过 Jupyter 运行它时:
library(leaflet)
m <- leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
m # Print the map
我收到此错误:
HTML widgets cannot be represented in plain text (need html).
按照here的建议,我试过了:
library(plotly)
embed_notebook(m)
但我明白了:
Error in UseMethod("embed_notebook"): no applicable method for 'embed_notebook' applied to an object of class "c('leaflet', 'htmlwidget')
我怎样才能画出这种图?
【问题讨论】: