File: downloadButton.Rd

package info (click to toggle)
r-cran-shiny 1.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,080 kB
  • ctags: 290
  • sloc: makefile: 22; sh: 13
file content (48 lines) | stat: -rw-r--r-- 1,182 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap.R
\name{downloadButton}
\alias{downloadButton}
\alias{downloadLink}
\title{Create a download button or link}
\usage{
downloadButton(outputId, label = "Download", class = NULL, ...)

downloadLink(outputId, label = "Download", class = NULL, ...)
}
\arguments{
\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.}

\item{...}{Other arguments to pass to the container tag function.}
}
\description{
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
function.
}
\examples{
\dontrun{
# 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')
}

}
\seealso{
downloadHandler
}