R: Place an Object within a Frame

grid.place {grid} | R Documentation

## Place an Object within a Frame

### Description

These functions provide a simpler (and faster) alternative to the `grid.pack()` and `packGrob` functions. They can be used to place objects within the existing rows and columns of a frame layout. They do not provide the ability to add new rows and columns nor do they affect the heights and widths of the rows and columns.

### Usage

    grid.place(gPath, grob, row = 1, col = 1, redraw = TRUE)
    placeGrob(frame, grob, row = NULL, col = NULL)

### Arguments

`gPath` | A gPath object, which specifies a frame on the display list.
`frame` | An object of class `frame`, typically the output from a call to `grid.frame`.
`grob` | An object of class `grob`. The object to be placed.
`row` | Which row to add the object to. Must be between 1 and the-number-of-rows-currently-in-the-frame.
`col` | Which col to add the object to. Must be between 1 and the-number-of-cols-currently-in-the-frame.
`redraw` | A boolean indicating whether the output should be updated.

### Details

`placeGrob` modifies the given frame grob and returns the modified frame grob.

`grid.place` destructively modifies a frame grob on the display list (and redraws the display list if `redraw` is `TRUE`).

### Value

`placeGrob` returns a frame grob, but `grid.place` returns `NULL`.

### Author(s)

Paul Murrell

### See Also

`grid.frame`, `grid.pack`, `grid.edit`, and `gPath`.

[Package grid version 4.0.5 Index]