Learn R Programming

plumber2 (version 0.2.0)

device_formatter: Create a graphics device formatter

Description

This internal function facilitates creating a formatter that uses a specific device for rendering.

Usage

device_formatter(dev_open, dev_close = grDevices::dev.off())

Value

A device formatter function

Arguments

dev_open

The function that opens the device

dev_close

The function closing the device. Usually this would be grDevices::dev.off()

Examples

Run this code
# Create a png formatter using the default png device
device_formatter(png)

Run the code above in your browser using DataLab