我正在尝试下载来自writeOGR函数的shapefile。但它无法正常工作,无法下载shapefile。有谁知道如何解决这一问题?我真的很感激!服务器来了.R:
output$shapefile <- renderUI({
if(is.null(input$action))
return(NULL)
else
isolate({
if(is.null(input$checkboxpd))
return(NULL)
else
downloadHandler(
filename = function() {
paste("Arvores_indiv_LiDAR", "shp", sep=".")
},
content = function() {
trees5 <- FindTreesCHM(fchm(), (as.numeric(input$fws)), (as.numeric(input$minht)))
lots <- SpatialPointsDataFrame(coords = cbind(trees5), data = trees5)
writeOGR(lots, dsn="Arvores_indiv_LiDAR.shp", layer = "Arvores_indiv_LiDAR", driver = "ESRI Shapefile")
dev.off
})
})
})
非常感谢! :)