Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Extract.tess

Extract or Replace Subset of Tessellation


Description

Extract, change or delete a subset of the tiles of a tessellation, to make a new tessellation.

Usage

## S3 method for class 'tess'
x[i, ...]
  ## S3 replacement method for class 'tess'
x[i, ...] <- value

Arguments

x

A tessellation (object of class "tess").

i

Subset index for the tiles of the tessellation. Alternatively a window (object of class "owin").

...

One argument that specifies the subset to be extracted or changed. Any valid format for the subset index in a list.

value

Replacement value for the selected tiles of the tessellation. A list of windows (objects of class "owin") or NULL.

Details

A tessellation (object of class "tess", see tess) is effectively a list of tiles (spatial regions) that cover a spatial region. The subset operator [.tess extracts some of these tiles and forms a new tessellation, which of course covers a smaller region than the original.

For [.tess only, the subset index can also be a window (object of class "owin"). The tessellation x is then intersected with the window.

The replacement operator changes the selected tiles. The replacement value may be either NULL (which causes the selected tiles to be removed from x) or a list of the same length as the selected subset. The entries of value may be windows (objects of class "owin") or NULL to indicate that the corresponding tile should be deleted.

Generally it does not make sense to replace a tile in a tessellation with a completely different tile, because the tiles are expected to fit together. However this facility is sometimes useful for making small adjustments to polygonal tiles.

Value

A tessellation (object of class "tess").

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk

See Also

Examples

A <- tess(xgrid=0:4, ygrid=0:3)
   B <- A[c(1, 3, 7)]
   E <- A[-1]
   A[c(2, 5, 11)] <- NULL

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.