我正在尝试确定grobWidth
应用于gtable
个对象的问题(请参阅gtable:::widthDetails.gtable
);将大小指定为单位总和(unit.arithmetic
对象),
library(grid)
u = unit(1,"npc") + unit(2,"mm")
grid:::absolute.units(u)
#Error in UseMethod("absolute.units") :
# no applicable method for 'absolute.units' applied to an object of class #"c('unit.arithmetic', 'unit')"
值得注意的是,absolute.size
有效,即使它调用了grid:::absolute.units
,
grid::absolute.size(u)
#[1] 1null+2mm
这怎么可能?
答案 0 :(得分:3)