ComplexHeatmap (version 1.10.2)

is_abs_unit: Whether the unit object contains absolute unit

Description

Whether the unit object contains absolute unit

Usage

is_abs_unit(u)

Arguments

u
a unit object

Value

  • A logical value.

Details

Besides the normal absolute units (e.g. "mm", "inches"), this function simply treat grob objects as absolute units.

For a complex unit which is combination of different units, it is absolute only if all units included are absolute units.

Examples

Run this code
is_abs_unit(unit(1, "mm"))
is_abs_unit(unit(1, "npc"))
is_abs_unit(textGrob("foo"))
is_abs_unit(unit(1, "mm") + unit(1, "npc"))

Run the code above in your browser using DataLab