markstat(spatstat)
markstat()所属R语言包:spatstat
Summarise Marks in Every Neighbourhood in a Point Pattern
信息Summarise在每一个邻里的标志点模式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Visit each point in a point pattern, find the neighbouring points, and summarise their marks
访问每一个点一个点的图案,找到相邻点,总结自己的商标
用法----------Usage----------
markstat(X, fun, N, R, ...)
参数----------Arguments----------
参数:X
A marked point pattern. An object of class "ppp".
一个显着的点模式。对象的类"ppp"。
参数:fun
Function to be applied to the vector of marks.
要施加到的向量的标记的功能。
参数:N
Integer. If this argument is present, the neighbourhood of a point of X is defined to consist of the N points of X which are closest to it. This argument is incompatible with R.
整数。如果这种说法是存在的,附近的一个点X定义包括N点X这是最接近它的。这种说法是不符合R。
参数:R
Nonnegative numeric value. If this argument is present, the neighbourhood of a point of X is defined to consist of all points of X which lie within a distance R of it. This argument is incompatible with N.
非负数值。如果这种说法是存在的,附近的点X定义包括所有点X范围内的距离R。这种说法是不符合N。
参数:...
extra arguments passed to the function fun. They must be given in the form name=value.
额外的参数传递给函数fun。必须给予他们的形式name=value。
Details
详细信息----------Details----------
This algorithm visits each point in the point pattern X, determines which points of X are “neighbours” of the current point, extracts the marks of these neighbouring points, applies the function fun to the marks, and collects the value or values returned by fun.
该算法访问中的每个点的点模式X,确定哪些点X是“邻居”目前的点位,这些相邻点提取的痕迹,适用的功能fun标记,并收集返回fun一个或多个值。
The definition of “neighbours” depends on the arguments N and R, exactly one of which must be given.
N和R,正是其中之一,必须给予的“邻居”的定义取决于具体的参数。
If N is given, then the neighbours of the current point are the N points of X which are closest to the current point (including the current point itself). If R is given, then the neighbourhood of the current point consists of all points of X which lie closer than a distance R from the current point.
N如果是给定的,那么当前点的邻居是N分X这是最接近当前点(包括目前的点位本身)。 R如果是给定的,那么目前的点位附近的X更近的距离R:从目前的点位于包括所有的点。
Each point of X is visited; the neighbourhood of the current point is determined; the marks of these points are extracted as a vector v; then the function fun is called as:
X的每一个点被访问,确定当前点的邻域,这些点的标记v;则该函数fun被称为一个矢量被提取作为:
fun(v, ...)
fun(v, ...)
where ... are the arguments passed from the call to markstat.
...是传递的参数调用markstat。
The results of each call to fun are collected and returned according to the usual rules for apply and its relatives. See Value above.
每个调用的结果fun收集,并根据返回apply及其亲属的一般规则。以上价值。
This function is just a convenient wrapper for a common use of the function applynbd. For more complex tasks, use applynbd. To simply tabulate the marks in every R-neighbourhood, use marktable.
此功能只是为了一个共同的使用的功能applynbd的一个方便的包装。对于更复杂的任务,使用applynbd。只是简单的制表在每一个R邻域的标记,使用marktable。
值----------Value----------
Similar to the result of apply. if each call to fun returns a single numeric value, the result is a vector of dimension X$n, the number of points in X. If each call to fun returns a vector of the same length m, then the result is a matrix of dimensions c(m,n); note the transposition of the indices, as usual for the family of apply functions. If the calls to fun return vectors of different lengths, the result is a list of length X$n.
类似apply的结果。如果每次调用fun返回一个数值,结果是一个向量的维X$n,点的数量在X。如果每次调用fun返回一个向量的长度相同m,那么结果是一个矩阵的尺寸c(m,n);注意换位的指标,像往常一样为家人 apply函数。如果调用fun返回向量不同长度,结果是一个列表的长度X$n。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
参见----------See Also----------
applynbd, marktable, ppp.object, apply
applynbd,marktable,ppp.object,apply
实例----------Examples----------
data(longleaf)
# average diameter of 5 closest neighbours of each tree[平均直径为5最近的邻居每个树]
md <- markstat(longleaf, mean, N=5)
# range of diameters of trees within 10 metre radius[在10米的半径范围内的树木直径]
rd <- markstat(longleaf, range, R=10)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|