下面是我的数据集。我正在尝试使用leaflet
在DT
中使用flexdashboard
和crosstalk
。我可以使用以下脚本在flexdashboard中运行数据。现在,我正在寻找无法在leaflet
部分创建全屏选项。我的目的是在传单上选择数据,并将所选数据反映到DT表中,目前正在工作。但我想将所选数据导出到CSV文档中?我无法做到。请帮忙 !
Date Hour Descr lat lng Final.Assessment
1/6/16 13 Paid -37.81550 145.0128 Paid in person
1/6/16 13 Paid -37.81550 145.0128 Paid in person
1/6/16 13 upaid -37.81550 145.0128 Not in contact
1/6/16 16 Paid -37.81760 144.9920 Paid in person
1/6/16 17 Paid -37.81127 144.9963 Paid via Online
1/6/16 17 loss -37.81127 144.9963 Bad product sold
我的flexdashboard脚本
`--- 标题:“连接地图和DT” 输出: flexdashboard :: flex_dashboard:
library(leaflet)
library(tidyverse)
library(dplyr)
library(crosstalk)
library(flexdashboard)
library(DT)
library(htmlwidgets)
library(htmltools)
newdata<-read.csv("Stackoverflow.csv")
shared_df<-SharedData$new(newdata)
leaflet(shared_df) %>%
addTiles() %>%
addMarkers()
datatable(shared_df)
datatable(shared_df, extensions="Scroller", style="bootstrap", class="compact", width="100%",
options=list(deferRender=TRUE, scrollY=300,scroller=TRUE, buttons = c('copy', 'csv', 'excel', 'pdf', 'print')))
`