rthin(spatstat)
rthin()所属R语言包:spatstat
Random Thinning
随机细化
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Applies independent random thinning to a point pattern.
适用于独立的随机稀疏阵列点。
用法----------Usage----------
rthin(X, P, ...)
参数----------Arguments----------
参数:X
A point pattern (object of class "ppp") that will be thinned.
A点模式(对象类"ppp")将会被摊薄。
参数:P
Data giving the retention probabilities, i.e. the probability that each point in X will be retained. Either a single number, or a vector of numbers, or a function(x,y), or a pixel image (object of class "im").
数据给予保留的概率,即每个点X将被保留的可能性。无论是单数,或一个数字向量,或function(x,y),或像素图像(类的对象"im"“)。
参数:...
Additional arguments passed to P, if it is a function.
额外的参数传递给P,如果它是一个函数。
Details
详细信息----------Details----------
In a random thinning operation, each point of the pattern X is randomly either deleted or retained (i.e. not deleted). The result is a point pattern, consisting of those points of X that were retained.
在随机减薄操作,每个点的图案X随机删除或保留(即未删除)。其结果是一个点的图案,由X保留的那些点。
Independent random thinning means that the retention/deletion of each point is independent of other points.
独立的随机变稀的手段保留/删除其他点,每个点是独立的。
The argument P determines the probability of retaining each point. It may be
的参数P决定保留每个点的概率。这可能是
a single number, so that each point will be retained with the same probability P;
一个单一的数字,让每个将被保留下来以相同的概率P;
a vector of numbers, so that the ith point of X will be retained with probability P[i];
数字向量,使得ith点X将被保留的概率P[i];
a function P(x,y), so that a point at a location (x,y) will be retained with probability P(x,y);
一个函数P(x,y),从而使一个点在一个位置(x,y)将被保留的概率P(x,y);
a pixel image, containing values of the retention probability for all locations in a region encompassing the point pattern.
一个像素的图像,保留概率值区域涵盖了点模式中的所有位置。
If P is a function, it should be "vectorised", that is, it should accept vector arguments x,y and should yield a numeric vector of the same length. The function may have extra arguments which are passed through the ... argument.
P如果是一个函数,它应该是“向量化”,也就是说,它应该接受的向量参数x,y和应该产生一个数值向量的长度相同。该函数可能有额外的参数,这些参数通过...参数。
值----------Value----------
A point pattern (object of class "ppp").
点模式(类的对象"ppp")。
(作者)----------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>
实例----------Examples----------
data(redwood)
plot(redwood, main="thinning")
# delete 20% of points[删除20%的点]
Y <- rthin(redwood, 0.8)
points(Y, col="green", cex=1.4)
# function[功能]
f <- function(x,y) { ifelse(x < 0.4, 1, 0.5) }
Y <- rthin(redwood, f)
# pixel image[图像像素]
Z <- as.im(f, redwood$window)
Y <- rthin(redwood, Z)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|