download_baseplot_server: Implement the download button for a base plot.

View source: R/download.R

download_baseplot_serverR Documentation

Implement the download button for a base plot.

Description

The server component of the Shiny module for creating a pretty download button for downloading a base plot as a png file.

Usage

download_baseplot_server(id, obj, fname = "download", dpi = 156, ...)

Arguments

id

String. The input slot that will be used to access the value.

obj

The ggplot2 object to be saved.

fname

String. Name of the file under which to save the object.

dpi

Number. The resolution of the saved png file. Default = 156.

...

Arguments that can be passed into 'grDevices::png()'. For example, 'units', 'width' and 'height'.

Value

A module server function that can be called in a reactive env.

See Also

download_ui for the UI.

Examples

inst/examples/ex-download.R

cabaceo/shinymod documentation built on Sept. 8, 2023, 12:23 p.m.