I'm trying to download a table generated from a function in server.R and I was trying to call it by input$example that comes from output$example. However, my excel file comes out blank. Does anyone know how to fix this? Here comes my server.R
**output$sumy** <- renderTable({
input$action
if(is.null(input$action))
return(NULL)
else
isolate({
trees2 <- FindTreesCHM(fchm(), (as.numeric(input$fws)), (as.numeric(input$minht)))
h <- trees2["height"]
TotalArvores <- nrow(trees2)
rbind(summary(h), TotalArvores, make.row.names = "Total number of trees")
})
})
output$downSumy <- downloadHandler(
filename = function() {
paste("Summary of LiDAR metrics", "csv", sep = ".")
},
content = function(file) {
write.table(**input$sumy**, file, sep = ",")
}
)
Does anyone know if it's even possible to call a function that comes from output within server.R?
Thanks a lot!