unitConverter: Internal: Convert value between dimension units

Description Usage Arguments Value

View source: R/pophelper.R

Description

Internal: Convert value between dimension units

Usage

1
unitConverter(value = NA, fromunit = NA, tounit = NA, dpi = NA)

Arguments

value

A numeric value or numeric vector to convert

fromunit

A character indicating the current unit of the value. Options are "cm", "mm", "in" or "px".

tounit

A character indicating the unit to change to. Options are "cm", "mm", "in" or "px".

dpi

A numeric indicating the resolution for pixel conversion. This should be in PPI (pixels per inch).

Value

Returns a numeric value or numeric vector in changed units.


royfrancis/pophelper documentation built on Aug. 21, 2018, 4:48 a.m.