My "download" button does not work as expectation. It opens a new app window every time I click on it. I am wondering why it functions in this way?
download function in server.R:
output$down_load <- downloadHandler(
# specify the file name
filename = function() {
paste('cls_result_export', Sys.Data(),'.csv', sep='')
},
# Write the plot back
content = function(file){
write.csv(cls_output()$raw_data, file)
}
)
download function in ui.R:
downloadButton(outputId = "down_load", label = "Download the CLS Raw Data")