Fetching contributors…
Cannot retrieve contributors at this time
47 lines (40 sloc) 1.08 KB
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap.R
\title{Create a download button or link}
downloadButton(outputId, label = "Download", class = NULL)
downloadLink(outputId, label = "Download", class = NULL)
\item{outputId}{The name of the output slot that the \code{downloadHandler}
is assigned to.}
\item{label}{The label that should appear on the button.}
\item{class}{Additional CSS classes to apply to the tag, if any.}
Use these functions to create a download button or link; when clicked, it
will initiate a browser download. The filename and contents are specified by
the corresponding \code{\link{downloadHandler}} defined in the server
# 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')