kohske/ggplot2 — comment on commit b36fd774f3b1af73342dd521c21cfb4f041f9d91
File: R/plot-render.r line 151
By BrianDiggs:

Whenever I see a `1:`... structure, I consider the possibility of a `1:0` bug (I've found one in base R, even). Is it absolutely impossible for `nrow(plot_table$layout)` to be less than 2? Also, since the index is repeated (after looking at it, it looks like it moves the last row to the top), why not pull that out? Or, should the second one reference `plot_table$grobs` rather than `plot_table$layout`? You would probably be better with `c(nrow(plot_table$layout), seq(length=nrow(plot_table$layout)-1))` or `c(nrow(plot_table$layout), seq.int(nrow(plot_table$layout)-1))`