Skip to contents

Takes existing HTML content, typically additional HTML including a gt table as a PNG via the {webshot2} package.

Usage

gtsave_extra(data, filename, path = NULL, ..., zoom = 2, expand = 5)

Arguments

data

HTML content to be saved temporarily to disk

filename

The name of the file, should end in .png

path

An optional path

...

Additional arguments to webshot2::webshot()

zoom

A number specifying the zoom factor. A zoom factor of 2 will result in twice as many pixels vertically and horizontally. Note that using 2 is not exactly the same as taking a screenshot on a HiDPI (Retina) device: it is like increasing the zoom to 200 doubling the height and width of the browser window.

expand

A numeric vector specifying how many pixels to expand the clipping rectangle by. If one number, the rectangle will be expanded by that many pixels on all sides. If four numbers, they specify the top, right, bottom, and left, in that order.

Value

Prints the HTML content to the RStudio viewer and saves a .png file to disk

Function ID

2-14