Produces a summary of information about the tiles in an
object of class deldir
as produced by the function
deldir()
.
tileInfo(object, bndry = FALSE, clipp=NULL)
An object of class "tileInfo"
which consists of a
list with components:
This is itself a list. If clipp
is NULL
then this list has one entry for each tile in
“object”. If clipp
is not NULL
then tiles
are retained only if they have non-empty intersection with the
polygon specified by clipp
. The list indivTiles
is
in fact a named list, the names being of form pt.n
,
where n
is equal to the value of ptNum
(see below)
corresponding to the tile.
The entries of indivTiles
are themselves in turn lists with
entries
edges
: a matrix whose rows consists of the x
and y
coordinates of the endpoints of each edge of the tile
edgeLengths
: a vector of the lengths of the edges
of the tile
area
: a positive number equal to the area of the tile
ptNum
an integer equal to the number of the point
determining the tile. Note that this is the number of the point
in the original sequence of points that were tessellated.
An integer vector of the number of edges for each of the tiles.
A table of allEdgeCounts
.
A vector of all of the tile edge lengths;
a catenation of the edgeLengths
components of the entries
of indivTiles
. Note that there will be many duplicate
lengths since each tile edge is, in general, an edge of two
tiles.
A vector of the areas of the tiles.
A vector of the lengths of the tiles edges
with the duplicates (which occur in allEdgeLengths
) being
eliminated. Each tile edge is represented only once.
A list, as returned by tilePerim()
containing the perimeters of the tiles, as well as the total and
the mean of these perimeters. In addition perimeters
has
a component perComps
giving the breakdown of the perimeters
into the perimeters of the parts into which tiles may have been
subdivided by the clipping process.
An object of class deldir
as produced
by the function deldir()
.
Logical scalar. If TRUE
then the “boundary” tiles
(those tiles having edges forming part of the “rectangular
window” enclosing the tessellation) are included in the summary.
Otherwise they are excluded. Note that if all tiles are
boundary tiles and bndry
is FALSE
, then the list of
included tiles is empty. In this setting the information summary
would be vacuous and hence an error is thrown.
An object specifying a polygon to which the tiles of
the tessellation should be clipped. See link{tile.list}()
for more information. Note that tiles which were originally
boundary tiles may no longer be boundary tiles after being clipped.
There is a print()
method for class "tileInfo"
which
produces a convenient display of the information returned by this
function.
Thanks to Krisztina Konya of Ruhr-University Bochum, who provided an example illustrating the need for an error trap in the setting in which all tiles are boundary tiles.
Rolf Turner rolfurner@posteo.net
deldir()
tile.list()
print.tileInfo()
tilePerim()
set.seed(42)
x <- runif(20)
y <- runif(20)
dxy <- deldir(x,y,rw=c(0,1,0,1))
ixy1 <- tileInfo(dxy)
ixy2 <- tileInfo(dxy,bndry=TRUE)
if(require(polyclip)) {
CP <- list(x=c(0.49,0.35,0.15,0.20,0.35,0.42,
0.43,0.62,0.46,0.63,0.82,0.79),
y=c(0.78,0.86,0.79,0.54,0.58,0.70,
0.51,0.46,0.31,0.20,0.37,0.54))
ixy3 <- tileInfo(dxy,clipp=CP) # 10 tiles are retained; the third tile,
# corresponding to point 6, is
# subdivided into two parts.
}
Run the code above in your browser using DataLab