px: Convert from any units to pixels

View source: R/units.R

pxR Documentation

Convert from any units to pixels

Description

Convert from any units to pixels

Usage

px(x, units = "pts", res = 96, round = TRUE)

Arguments

x

A numeric vector

units

A character vector specifying the units for the corresponding numeric values.

res

Pixels per inch to use as resulution. Defaults to 96, because this is a common web font conversion factor.

round

Whether to round to the nearest full pixel. Defaults to TRUE.


charlie-gallagher/ggunit documentation built on April 5, 2022, 4:29 a.m.