Closed yihui closed 9 years ago
gridExtra underwent major internal changes. The output is now a gtable, so you can query its size with convertWidth(sum(g$widths), "in", TRUE)
and convertWidth(sum(g$heights), "in", TRUE)
.
Thanks! It is fine to introduce major changes, but I guess it will be nice to document them in NEWS or CHANGELOG and tell us what to do for our old code. It will be even nicer to deprecate functions for a while before completely removing them.
BTW grobWidth
and convertWidth
are grid functions; they haven't disappeared but i) grid is no longer attached by gridExtra, and ii) gtables are special grobs, and don't always play nice with grid (the respective maintainers don't seem to have the same views, as far as I can tell from our numerous interactions). In this particular case, grid hasn't exported the method absolute.units.unit.arithmetic
.
It's a shame I didn't notice this issue before the release, but such oversights are bound to happen. I contacted the maintainers of all reverse dependencies, helped them fix their code in case of breakage, wrote vignettes to document the new functions, edited the relevant SO answers, but somewhere in the web, someone will have code that I didn't think about. This is one example, there will be more. The point being, I have very limited time and resources for this project, and short of orphaning gridExtra altogether, this cleaner release was my best compromise.
Understood. Thanks a lot!
BTW grobWidth/grobHeight are now working with R-devel, but I suggest you keep using sum(g$widths)
and sum(g$heights)
as they yield better size estimates.
Got you. Thanks!
After upgrading to 2.0.0, this example was broken: https://github.com/yihui/knitr-examples/blob/master/040-grid-table.Rnw The NEWS file is so terse (so are the GIT commit messages), and I have no idea about what I need to do to fix the example. Hints?