is_abs_unit.Rd
Test Whether it is an Absolute Unit
is_abs_unit(u)
u | A |
---|
Besides the normal absolute units (e.g. "mm", "inches"), this function
simply assumes 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.
A logical value.
is_abs_unit(unit(1, "mm"))#> [1] TRUEis_abs_unit(unit(1, "npc"))#> [1] FALSEis_abs_unit(textGrob("foo"))#> [1] FALSEis_abs_unit(unit(1, "mm") + unit(1, "npc"))#> [1] FALSE