distfun(spatstat)
distfun()所属R语言包:spatstat
Distance Map as a Function
作为一个功能的距离图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute the distance function of an object, and return it as a function.
计算的距离函数的一个对象,并返回它作为一个函数。
用法----------Usage----------
distfun(X, ...)
## S3 method for class 'ppp'
distfun(X, ...)
## S3 method for class 'psp'
distfun(X, ...)
## S3 method for class 'owin'
distfun(X, ..., invert=FALSE)
参数----------Arguments----------
参数:X
Any suitable dataset representing a two-dimensional object, such as a point pattern (object of class "ppp"), a window (object of class "owin") or a line segment pattern (object of class "psp").
任何合适的数据集,代表一个二维对象,如一个点图案(类的对象"ppp"),一个窗口(对象类"owin")或类的对象的线段图案(<X >)。
参数:...
Extra arguments are ignored.
额外的参数将被忽略。
参数:invert
If TRUE, compute the distance transform of the complement of X.
如果TRUE,计算的距离变换的补X。
Details
详细信息----------Details----------
The “distance function” of a set of points A is the mathematical function f such that, for any two-dimensional spatial location (x,y), the function value f(x,y) is the shortest distance from (x,y) to A.
“距离函数”的一组点A是数学函数f,这样,任何二维空间位置(x,y),函数值f(x,y)是最短的距离(x,y)到A。
The command f <- distfun(X) returns a function in the R language, with arguments x,y, that represents the distance function of X. Evaluating the function f in the form v <- f(x,y), where x and y are any numeric vectors of equal length containing coordinates of spatial locations, yields the values of the distance function at these locations.
命令f <- distfun(X)返回R语言中的一个函数,参数x,y,表示距离函数的X。评价函数f的形式v <- f(x,y),其中x和y是任何数值向量长度相等的包含空间位置,产生的距离函数值的坐标这些位置。
This should be contrasted with the related command distmap which computes the distance function of X on a grid of locations, and returns the distance values in the form of a pixel image.
这应与相关的命令,计算的距离函数的distmap对比X在网格上的位置,并返回的距离值的像素图像的形式。
A distfun object can be converted to a pixel image using as.im.
可以转换为一个像素的图像,使用distfunAas.im对象。
值----------Value----------
A function with arguments x,y. The function also belongs to the class "distfun" for which there are methods for print, plot, contour and persp.
Afunction参数x,y。该函数也属于类"distfun"有print,plot,contour和persp方法。
(作者)----------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----------
distmap, plot.distfun
distmap,plot.distfun
实例----------Examples----------
data(letterR)
f <- distfun(letterR)
f(0.2, 0.3)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|