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

as.data.frame.tess

Convert Tessellation to Data Frame


Description

Converts a spatial tessellation object to a data frame.

Usage

## S3 method for class 'tess'
as.data.frame(x, ...)

Arguments

x

Tessellation (object of class "tess").

...

Further arguments passed to as.data.frame.owin or as.data.frame.im and ultimately to as.data.frame.default to determine the row names and other features.

Details

This function converts the tessellation x to a data frame.

If x is a pixel image tessellation (a pixel image with factor values specifying the tile membership of each pixel) then this pixel image is converted to a data frame by as.data.frame.im. The result is a data frame with columns x and y giving the pixel coordinates, and Tile identifying the tile containing the pixel.

If x is a tessellation consisting of a rectangular grid of tiles or a list of polygonal tiles, then each tile is converted to a data frame by as.data.frame.owin, and these data frames are joined together, yielding a single large data frame containing columns x, y giving the coordinates of vertices of the polygons, and Tile identifying the tile.

Value

A data frame with columns named x, y, Tile, and possibly other columns.

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

Z <- as.data.frame(dirichlet(cells))
  head(Z, 10)

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.