r - 使用传单进行多个弹出窗口
问题描述
按照此代码制作多个弹出值,显示每个标记的年份、区域、flat_type 和转售价值,但它一直给我这个错误
错误:“闭包”类型的对象不是子集
这是我从代码中遵循的内容,并进行了自己的更改。df
指数据集。传单图中有 2 个不同的数据集。
output$mymap <- renderLeaflet({
leaflet(data=df()) %>%
addTiles() %>%
addPolygons(data=adm, weight = 3, fillColor = "white", popup=popup)%>%
addMarkers(clusterOptions = markerClusterOptions(), popup = paste("Year of Purchase:", df$year, "<br>",
"Region", df$region, "<br>",
"Flat-Type",df$flat_type,"<br>",
"Resale Price:",df$resale_price , "<br>",
"Address:", toupper(df$geoAddress)))%>%
addMarkers(data=mrt,lat = ~lat,lng = ~lon,label=mrt$mrt_station,icon = mrticon)
这是我的数据
head(headlinedata,1)
month town flat_type block street_name storey_range floor_area_sqm flat_model lease_commence_date resale_price year month1
1 2007-01 ANG MO KIO 5 ROOM 259 ANG MO KIO AVE 2 04 TO 06 135 MODEL A 1982 345000 2007 1
region address lat lon geoAddress
1 North_East BLOCK 259 , ANG MO KIO AVE 2 , SINGAPORE 1.368554 103.8316 259 ang mo kio ave 2, singapore 560259
这是我的代码
解决方案
推荐阅读
- javascript - 在跨域ajax帖子的回调函数中未定义
- c# - 如何将 DataGrid 绑定到设计结构矩阵 (DSM)
- amazon-web-services - AWS IoT DynamoDB 创建规则
- r - r - 创建后代的可能结果基因型
- powershell - 使用 RSJobs 运行多个不同的 ScriptBlock
- android - 无法获取三星 Galaxy Note 10.1 (N8010) 帧缓冲区,fb0 仅显示顶栏
- c - 在 C 中创建一个 atoi 函数
- swift - 使用 xmppFramework 连接到服务器时卡住
- android - Zygote: isWhitelistProcess - 进程被列入白名单
- java - 为什么字母数字 id 搜索在 Java Swing 中无法正常工作?