Closed trinker closed 8 years ago
it's meant to work (and does for me with current R). Can you show the error message to give a clue? (I don't want to install R-dev so close after a release, it seems less stable.
Yeah works for me with he current build of R as well (under Windows I can run multiple R versions).
library(gridExtra)
grid.arrange(grid::rectGrob(), grid::rectGrob(), heights = c(.3, .7))
## > grid.arrange(grid::rectGrob(), grid::rectGrob(), heights = c(.3, .7))
## Error: is.unit(heights) is not TRUE
sessionInfo()
## R Under development (unstable) (2015-09-19 r69398)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 8.1 x64 (build 9600)
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2] LC_CTYPE=English_United States.1252
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C
## [5] LC_TIME=English_United States.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] gridExtra_2.0.0
##
## loaded via a namespace (and not attached):
## [1] tools_3.3.0 gtable_0.1.2 grid_3.3.0
This works though:
grid.arrange(grid::rectGrob(), grid::rectGrob(), heights = grid::unit(c(.3, .7), "native"))
This may be something that goes away when this version of R is released.
dunno, works for me with R-devel on a Mac. Let's wait and see if this fixes itself, I can't see what could have changed that would cause this error message.
I'm not sure if this is going to be a future problem for folks relying on a behavior maybe they ought not to have been but I noticed that using gridExtra 2.0.0 with grid 3.3.0 the following use of simple
c
withwidths
/heights
argument results in an error insidearrangeGrob
This may not be the correct approach but seems to fix it:
I'm asking: