Dear All, Please consider the snippet at the end of the email, largely based on what you find here http://bit.ly/1ND6MGa When I run it, I get this error Error in arrangeGrob(p, sub = textGrob("Footnote", x = 0, hjust -0.1, : could not find function "textGrob" However, the code runs on another machine I own. I suppose something must have changed in the gridExtra library but right now I am banging my head against the wall. This is my sessionInfo()> sessionInfo()R version 3.2.2 (2015-08-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux stretch/sid locale: [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C [3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8 [5] LC_MONETARY=en_GB.utf8 LC_MESSAGES=en_GB.utf8 [7] LC_PAPER=en_GB.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] gridExtra_2.0.0 ggplot2_1.0.1 loaded via a namespace (and not attached): [1] Rcpp_0.11.6 digest_0.6.8 MASS_7.3-43 grid_3.2.2 [5] plyr_1.8.3 gtable_0.1.2 magrittr_1.5 scales_0.3.0 [9] stringi_0.5-5 reshape2_1.4.1 proto_0.3-10 labeling_0.3 [13] tools_3.2.2 stringr_1.0.0 munsell_0.4.2 colorspace_1.2-6 Any suggestion is appreciated. Cheers Lorenzo ############################################################## library(ggplot2) toyota <- mpg[which(mpg$manufacturer == 'toyota'), ] p <- ggplot(toyota, aes(displ, hwy)) + facet_wrap(~ class, ncol = 2) + geom_point(aes(size=cyl)) print(p) library(gridExtra) g <- arrangeGrob(p, sub = textGrob("Footnote", x = 0, hjust = -0.1, vjust=0.1, gp = gpar(fontface = "italic", fontsize = 18))) ggsave("/Users/Alan/Desktop/plot_grid_extra.png", g)
gridExtra was changed. This is the email from Baptiste to CRAN package developers that describes the changes and points to the vignettes that will describe the changes. The changes described here are now in the current release of gridExtra. Baptiste Auguie <baptiste.auguie at gmail.com> Jul 9 Reply to Borja, Pablo, Paul-Christian, Zachary, Andrey, Liam, Michael, Rafael, Mikkel, Xinyu, Christopher, Andrew, Thierry, Diogo, Grigori, Felix, Adelino , Dean, Wencke, Brian, me, Frank, Jason, Pieter, Timothy Dear package maintainers, I'm working on a long-overdue update of gridExtra for CRAN, and I believe your package depends on it. Please have a look at the dev version on github, and let me know if it breaks something in your package. https://github.com/baptiste/gridextra I've removed practically everything; only two main functions are left: grid.arrange(), and grid.table(). I believe they were by-and-large the only ones actually used, and the rest was mostly experimental code that shouldn't stay on CRAN. I've rewritten these two functions using gtable, which I found more practical and extensible. However, this means that the new functions are entirely different from their predecessor, internally, and may break a lot of code. I have included two vignettes for an overview of these updated functions, also reproduced in the wiki: https://github.com/baptiste/gridextra/wiki/tableGrob https://github.com/baptiste/gridextra/wiki/arrangeGrob Regards, baptiste On Thu, Aug 27, 2015 at 3:33 PM, Lorenzo Isella <lorenzo.isella at gmail.com> wrote:> Dear All, > Please consider the snippet at the end of the email, largely based on > what you find here > > http://bit.ly/1ND6MGa > > When I run it, I get this error > > Error in arrangeGrob(p, sub = textGrob("Footnote", x = 0, hjust > -0.1, : > could not find function "textGrob" > > However, the code runs on another machine I own. I suppose something > must have changed in the gridExtra library but right now I am banging > my head against the wall. > > This is my sessionInfo() > > sessionInfo() >> > R version 3.2.2 (2015-08-14) > Platform: x86_64-pc-linux-gnu (64-bit) > Running under: Debian GNU/Linux stretch/sid > > locale: > [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C > [3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8 > [5] LC_MONETARY=en_GB.utf8 LC_MESSAGES=en_GB.utf8 > [7] LC_PAPER=en_GB.utf8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] gridExtra_2.0.0 ggplot2_1.0.1 > > loaded via a namespace (and not attached): > [1] Rcpp_0.11.6 digest_0.6.8 MASS_7.3-43 grid_3.2.2 > [5] plyr_1.8.3 gtable_0.1.2 magrittr_1.5 scales_0.3.0 > [9] stringi_0.5-5 reshape2_1.4.1 proto_0.3-10 labeling_0.3 > [13] tools_3.2.2 stringr_1.0.0 munsell_0.4.2 > colorspace_1.2-6 > > Any suggestion is appreciated. > Cheers > > Lorenzo > > > ############################################################## > library(ggplot2) > toyota <- mpg[which(mpg$manufacturer == 'toyota'), ] > p <- ggplot(toyota, aes(displ, hwy)) + facet_wrap(~ class, ncol = 2) + > geom_point(aes(size=cyl)) > print(p) > library(gridExtra) > g <- arrangeGrob(p, sub = textGrob("Footnote", x = 0, hjust = -0.1, > vjust=0.1, gp = gpar(fontface = "italic", fontsize = 18))) > ggsave("/Users/Alan/Desktop/plot_grid_extra.png", g) > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Hello, And thanks for pointing this out to me. Do you have any idea about how to "fix" the example I provided? I made some attempts, but they were unsuccessful. Cheers Lorenzo On Thu, Aug 27, 2015 at 07:50:40PM -0400, Richard M. Heiberger wrote:>gridExtra was changed. This is the email from Baptiste to CRAN package >developers that describes the changes and >points to the vignettes that will describe the changes. The changes >described here are now in the current release of gridExtra. > >Baptiste Auguie <baptiste.auguie at gmail.com> >Jul 9 >Reply >to Borja, Pablo, Paul-Christian, Zachary, Andrey, Liam, Michael, Rafael, >Mikkel, Xinyu, Christopher, Andrew, Thierry, Diogo, Grigori, Felix, Adelino >, Dean, Wencke, Brian, me, Frank, Jason, Pieter, Timothy >Dear package maintainers, > >I'm working on a long-overdue update of gridExtra for CRAN, and I believe >your package depends on it. Please have a look at the dev version on >github, and let me know if it breaks something in your package. > >https://github.com/baptiste/gridextra > >I've removed practically everything; only two main functions are left: >grid.arrange(), >and grid.table(). I believe they were by-and-large the only ones actually >used, and the rest was mostly experimental code that shouldn't stay on >CRAN. >I've rewritten these two functions using gtable, which I found more >practical and extensible. However, this means that the new functions are >entirely different from their predecessor, internally, and may break a lot >of code. I have included two vignettes for an overview of these updated >functions, also reproduced in the wiki: >https://github.com/baptiste/gridextra/wiki/tableGrob >https://github.com/baptiste/gridextra/wiki/arrangeGrob > >Regards, > >baptiste > >On Thu, Aug 27, 2015 at 3:33 PM, Lorenzo Isella <lorenzo.isella at gmail.com> >wrote: > >> Dear All, >> Please consider the snippet at the end of the email, largely based on >> what you find here >> >> http://bit.ly/1ND6MGa >> >> When I run it, I get this error >> >> Error in arrangeGrob(p, sub = textGrob("Footnote", x = 0, hjust >> -0.1, : >> could not find function "textGrob" >> >> However, the code runs on another machine I own. I suppose something >> must have changed in the gridExtra library but right now I am banging >> my head against the wall. >> >> This is my sessionInfo() >> >> sessionInfo() >>> >> R version 3.2.2 (2015-08-14) >> Platform: x86_64-pc-linux-gnu (64-bit) >> Running under: Debian GNU/Linux stretch/sid >> >> locale: >> [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C >> [3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8 >> [5] LC_MONETARY=en_GB.utf8 LC_MESSAGES=en_GB.utf8 >> [7] LC_PAPER=en_GB.utf8 LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] gridExtra_2.0.0 ggplot2_1.0.1 >> >> loaded via a namespace (and not attached): >> [1] Rcpp_0.11.6 digest_0.6.8 MASS_7.3-43 grid_3.2.2 >> [5] plyr_1.8.3 gtable_0.1.2 magrittr_1.5 scales_0.3.0 >> [9] stringi_0.5-5 reshape2_1.4.1 proto_0.3-10 labeling_0.3 >> [13] tools_3.2.2 stringr_1.0.0 munsell_0.4.2 >> colorspace_1.2-6 >> >> Any suggestion is appreciated. >> Cheers >> >> Lorenzo >> >> >> ############################################################## >> library(ggplot2) >> toyota <- mpg[which(mpg$manufacturer == 'toyota'), ] >> p <- ggplot(toyota, aes(displ, hwy)) + facet_wrap(~ class, ncol = 2) + >> geom_point(aes(size=cyl)) >> print(p) >> library(gridExtra) >> g <- arrangeGrob(p, sub = textGrob("Footnote", x = 0, hjust = -0.1, >> vjust=0.1, gp = gpar(fontface = "italic", fontsize = 18))) >> ggsave("/Users/Alan/Desktop/plot_grid_extra.png", g) >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >>