I have a shiny app where I am using downloadHandler/downloadButton to download a table. I have currently implemented the download to csv file. But would like to be able to download the same table as both csv and tsv file by clicking that one button. Is that possible ?
This is my code for the server side:
output$downloadTable <- downloadHandler(
filename = function() {
paste("type1_drugs_table_",Sys.Date(),".csv",sep="")
},
content = function(file) {
write.csv(Type1(), file, row.names = FALSE, quote=FALSE, sep="\t")
}
}, # end of content
)