50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

rgl (version 0.98.22)

figWidth: Get R Markdown figure dimensions in pixels.

Description

In an R Markdown document, figure dimensions are normally specified in inches; these are translated into pixel dimensions when HTML output is requested and rglwidget is used. These functions reproduce that translation.

Usage

figWidth()
figHeight()

Arguments

Value

When used in an R Markdown document, these functions return the requested current dimensions of figures in pixels. Outside such a document, no useful value is returned.

Details

It is currently necessary to use figWidth() and figHeight() when rglwidget is used within a %>%-style pipe as in the example below.

Examples

Run this code
# NOT RUN {
# No useful return value outside of R Markdown:
figWidth()
figHeight()
# }

Run the code above in your browser using DataLab