library(grid) simpleUnit <- function() { unit(1:100, c('mm')) } stdUnit <- function() { unit(1:100, c('mm', 'inches')) }