cells(tripack)
cells()所属R语言包:tripack
extract info about voronoi cells
Voronoi单元中提取信息
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function returns some info about the cells of a voronoi mosaic, including the coordinates of the vertices and the cell area.
此函数返回一些有关的信息的单元格的Voronoi马赛克,包括的顶点坐标和小区区域。
用法----------Usage----------
cells(voronoi.obj)
参数----------Arguments----------
参数:voronoi.obj
object of class voronoi
对象的类voronoi
Details
详细信息----------Details----------
The function calculates the neighbourhood relations between the underlying triangulation and translates it into the neighbourhood relations between the voronoi cells.
该函数计算的基本三角之间的邻里关系,并把它转换成的Voronoi单元的邻里关系。
值----------Value----------
retruns a list of lists, one entry for each voronoi cell which contains <table summary="R valueblock"> <tr valign="top"><td>cell </td> <td> cell index</td></tr> <tr valign="top"><td>center </td> <td> cell 'center'</td></tr> <tr valign="top"><td>neighbours </td> <td> neighbour cell indices</td></tr> <tr valign="top"><td>nodes</td> <td> 2 times nnb matrix with vertice coordinates</td></tr> <tr valign="top"><td>area</td> <td> cell area</td></tr> </table>
retruns一个列表的列表,一个条目,每个Voronoi单元,其中包含<table summary="R valueblock"> <tr valign="top"> <TD> cell </ TD> <TD>单元指数</ TD> </ TR> <tr valign="top"> <TD>center </ TD> <TD>单元中心“</ TD> </ TR> <tr valign="top"> < neighbours TD> </ TD> <TD>相邻小区指数</ TD> </ TR> <tr valign="top"> <TD>nodes </ TD> <TD> 2倍nnb顶点坐标矩阵</ TD> </ TR> <tr valign="top"> <TD>area </ TD> <TD>单元面积</ TD> </ TR> </ TABLE>
注意----------Note----------
outer cells have area=NA, currently also nodes=NA
外层单元area=NA,目前还nodes=NA
(作者)----------Author(s)----------
A. Gebhardt
参见----------See Also----------
voronoi.mosaic, voronoi.area
voronoi.mosaic,voronoi.area
实例----------Examples----------
data(tritest)
tritest.vm <- voronoi.mosaic(tritest$x,tritest$y)
tritest.cells <- cells(tritest.vm)
# higlight cell 12:[higlight小区12:]
plot(tritest.vm)
polygon(t(tritest.cells[[12]]$nodes),col="green")
# put cell area into cell center:[单元面积为小区中心:]
text(tritest.cells[[12]]$center[1],
tritest.cells[[12]]$center[2],
tritest.cells[[12]]$area)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|