# In server.R:
output$downloadData <- downloadHandler(
filename = function() {
paste('data-', Sys.Date(), '.csv', sep='')
},
content = function(con) {
write.csv(data, con)
}
)
# In ui.R:
downloadLink('downloadData', 'Download')
Run the code above in your browser using DataLab