baptiste / gridExtra

Miscellaneous Functions for "Grid" Graphics
http://cran.r-project.org/web/packages/gridExtra/index.html
15 stars 4 forks source link

arrangeGrob Documentation has Incorrect Information #24

Closed DarioS closed 8 years ago

DarioS commented 8 years ago

The function definition of grid.arrange is grid.arrange(..., newpage = TRUE) and ... is described as "grobs, gtables, ggplot or trellis objects". However, parameters such as nrow are also accepted and have an effect, although they are not any of the listed objects.

In the Values section, there is no entry for grid.arrange, even though it also returns a gtable.

It seems that grid.arrange and arrangeGrob are almost exactly the same. Why not just have one function, with a plot option ? e.g grid.arrange(onePlot, otherPlot, plot = FALSE)

The Functions section appears last. Would it be better if it was immediately after the Usage section ?

baptiste commented 8 years ago

having two separate functions is a convention of the grid package; I agree the documentation isn't very clear since both functions are on the same page with different meaning of .... One option would be to copy explicitly all the parameters as in `grid.arrange = function(..., ncol) arrangeGrob(..., ncol=ncol), I'll try to do that when I find the time (it's a rather low priority).