knitr::opts_chunk$set(echo = TRUE)
ladida = function(){ data <- mtcars file_name = function() { file_name = paste("data-", Sys.Date(), ".csv", sep="") print(file_name) return(file_name) } cont = function(file) { print(file) save(data, file = file) } downloadHandler( filename = 'file_name.csv', content = cont , outputArgs = list(label = 'Save Map') ) } ladida()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.