[R] Changing layout in grid.arrange

Roy Mendelssohn - NOAA Federal roy.mendelssohn at noaa.gov
Fri May 8 16:53:22 CEST 2015

Hi All:

I am doing something very similar to the the example in the grid.arrange package:

plots = lapply(1:10, function(.x) qplot(1:10,rnorm(10), main=paste("plot",.x)))
do.call(grid.arrange,  plots)

If you run this, the layout is 4 rows and 3 columns with graphs 1-3 going across. What I would like instead is for the layout to have 2 columns and 5 rows, with graphs 1-5 going down the first column, graphs 6-10 going down the second column but almost everything I have tried has failed.  Any help appreciated.

-Roy M.

"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn
Supervisory Operations Research Analyst
Environmental Research Division
Southwest Fisheries Science Center
***Note new address and phone***
110 Shaffer Road
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

More information about the R-help mailing list