Description Usage Arguments Details Value Author(s) See Also Examples

Construct a hexagonal grid of points, or a hexagonal tessellation.

1 2 3 |

`W` |
Window in which to construct the hexagonal grid or tessellation.
An object of class |

`s` |
Side length of hexagons. A positive number. |

`offset` |
Numeric vector of length 2 specifying a shift of the hexagonal grid. See Details. |

`origin` |
Numeric vector of length 2 specifying the initial origin of the hexagonal grid, before the offset is applied. See Details. |

`trim` |
Logical value indicating whether to restrict the result to
the window |

`hexgrid`

constructs a hexagonal grid of points
on the window `W`

. If `trim=TRUE`

(the default),
the grid is intersected with `W`

so that all points lie
inside `W`

. If `trim=FALSE`

, then we retain all grid points
which are the centres of hexagons that intersect `W`

.

`hextess`

constructs a tessellation of hexagons
on the window `W`

. If `trim=TRUE`

(the default),
the tessellation is restricted to the interior of `W`

,
so that there will be some fragmentary hexagons near the
boundary of `W`

. If `trim=FALSE`

, the tessellation
consists of all hexagons which intersect `W`

.

The points of `hexgrid(...)`

are the
centres of the tiles of `hextess(...)`

in the same order.

In the initial position of the grid or tessellation,
one of the grid points (tile centres) is placed at the
`origin`

, which defaults to the midpoint of the
bounding rectangle of `W`

. The grid can be shifted
relative to this origin by specifing the `offset`

.

The value of `hexgrid`

is a point pattern (object of class
`"ppp"`

).

The value of `hextess`

is a tessellation (object of class `"tess"`

).

1 2 3 4 5 6 7 8 9 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.