New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid.arrange() fails with infinite recursion error in r-devel #1159

Closed
kmiddleton opened this Issue Jul 8, 2015 · 5 comments

Comments

Projects
None yet
6 participants
@kmiddleton

kmiddleton commented Jul 8, 2015

In r-devel (2015-07-07 r68640) with the development version of ggplot2 and gridExtra version 0.9.1, calls to grid.arrange() fail with the error:

Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Error during wrapup: evaluation nested too deeply: infinite recursion / options(expressions=)?

using the minimal code:

library("ggplot2")
library("gridExtra")

p1 <- qplot(rnorm(5))
p2 <- qplot(rnorm(5))

grid.arrange(p1, p2)

My sessionInfo():

R Under development (unstable) (2015-07-07 r68640)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods
base

other attached packages:
[1] gridExtra_0.9.1    ggplot2_1.0.1.9002 fortunes_1.5-2 devtools_1.8.0

loaded via a namespace (and not attached):
  [1] Rcpp_0.11.6      digest_0.6.8     MASS_7.3-42      plyr_1.8.3 gtable_0.1.2     git2r_0.10.1     magrittr_1.5     scales_0.2.5
  [9] stringi_0.5-5    curl_0.9.1       reshape2_1.4.1   xml2_0.1.1 labeling_0.3     tools_3.3.0      stringr_1.0.0    munsell_0.4.2
[17] colorspace_1.2-6 rversions_1.0.1  memoise_0.2.1
@hrbrmstr

This comment has been minimized.

Contributor

hrbrmstr commented Jul 13, 2015

Verified this as reproducible just now (debugging some code for someone)

@hadley

This comment has been minimized.

Member

hadley commented Jul 23, 2015

This seems like a gridExtra bug to me.

@hadley hadley closed this Jul 23, 2015

@sctyner

This comment has been minimized.

sctyner commented Sep 1, 2015

@kmiddleton I got the same error. So, I uninstalled the dev version of ggplot2, restarted my R session, installed the CRAN version of ggplot2, reran the same code, and it worked just as expected. There is definitely something happening with the interaction of the gridExtra package and the dev version of ggplot2.

@baptiste

This comment has been minimized.

Contributor

baptiste commented Feb 4, 2016

People running into this error should probably update gridExtra to v2.0.0. My guess is that the message comes from changes in grid.draw for ggplot2 / gtable objects, but it's pointless to track it down since the current packages are compatible and don't show the problem.

@zhenglei-gao

This comment has been minimized.

zhenglei-gao commented Mar 29, 2016

Got the same error and fixed by updating gridExtra.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.