Displaying 2 results from an estimated 2 matches for "panel_index_w".
2016 Mar 08
1
Could unit.list() from grid package be made an exported function?
...he latest R devel and it works for me. However:
This works for me for the three stackoverflow scenarios.
I ran into an additional problem when trying to replicate this example:
http://stackoverflow.com/a/32583612/4975218
This line in the function set_panel_size() causes an error for me:
g$widths[panel_index_w] <- rep(list(width), nw)
Error in `[<-.unit`(`*tmp*`, panel_index_w, value = list(4, 4, 4)) :
Value being assigned must be a unit
I can avoid the error by changing the line into:
g$widths[panel_index_w] <- rep(grid:::unit.list(width), nw)
This, however, again uses grid:::unit.list()...
2016 Mar 06
3
Could unit.list() from grid package be made an exported function?
Hello,
certain manipulations of ggplot2 graphs, in particular aligning them, require the function grid:::unit.list(). See e.g. these posts on stackoverflow:
http://stackoverflow.com/questions/34032621/element-replacement-in-grid-unit-vector
http://stackoverflow.com/questions/32580946/setting-absolute-size-of-facets-in-ggplot2/32583612#32583612
http://stackoverflow.com/a/35823179/4975218
Since