device_formatter: Create a graphics device formatter

View source: R/serializers.R

device_formatterR Documentation

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())

Arguments

dev_open

The function that opens the device

dev_close

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

Value

A device formatter function

Examples

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


plumber2 documentation built on Jan. 20, 2026, 5:06 p.m.