找回密码
 注册
查看: 299|回复: 0

R语言 spatstat包 pairdist.default()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:52:11 | 显示全部楼层 |阅读模式
pairdist.default(spatstat)
pairdist.default()所属R语言包:spatstat

                                        Pairwise distances
                                         成对距离

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Computes the matrix of distances between all pairs of points in a set of points
计算在一组点在所有对点之间的距离的矩阵


用法----------Usage----------


  ## Default S3 method:
pairdist(X, Y=NULL, ..., period=NULL, method="C", squared=FALSE)



参数----------Arguments----------

参数:X,Y
Arguments specifying the coordinates of a set of points. Typically X and Y would be numeric vectors of equal length. Alternatively Y may be omitted and X may be a list with two components x and y, or a matrix with two columns.  
引数,指定的一组点的坐标。通常情况下X和Y将数字向量的长度相等。或者Y可以省略,并且X可以是带有两个组件的列表x和y,或一个具有两列的矩阵。


参数:...
Ignored.  
忽略。


参数:period
Optional. Dimensions for periodic edge correction.  
可选。尺寸为周期的边缘校正。


参数:method
String specifying which method of calculation to use. Values are "C" and "interpreted". Usually not specified.  
字符串,用于指定使用的计算方法。值是"C"和"interpreted"。通常没有指定。


参数:squared
Logical. If squared=TRUE, the squared distances are returned instead (this computation is faster).  
逻辑。如果squared=TRUE,距离的平方返回,而不是(此计算速度更快)。


Details

详细信息----------Details----------

Given the coordinates of a set of points, this function computes the Euclidean distances between all pairs of points, and returns the matrix of distances. It is a method for the generic function pairdist.
给定的一组点的坐标,此函数计算所有对点之间的欧几里德距离,以及返回的距离矩阵。这是一个方法的通用函数pairdist。

The arguments X and Y must determine the coordinates of a set of points. Typically X and Y would be numeric vectors of equal length. Alternatively Y may be omitted and X may be a list with two components named x and y, or a matrix or data frame with two columns.
的参数中的X和Y必须确定的一组点的坐标。通常情况下X和Y将数字向量的长度相等。或者Y可以省略,并且X可能是一个名为x和y,或具有两列的矩阵或数据框的两个组件列表。

Alternatively if period is given, then the distances will be computed in the "periodic" sense (also known as "torus" distance). The points will be treated as if they are in a rectangle of width period[1] and height period[2]. Opposite edges of the rectangle are regarded as equivalent.
或者如果period给出,那么距离将被计算在定期感(也被称为环面的距离)。将被视为该点,如果他们是在一个矩形的宽度period[1]和高度period[2]。矩形的相对边缘被认为等同。

If squared=TRUE then the squared Euclidean distances d^2 are returned, instead of the Euclidean distances d. The squared distances are faster to calculate, and are sufficient for many purposes (such as finding the nearest neighbour of a point).
如果squared=TRUE然后的平方欧氏距离d^2返回,而不是的欧几里德距离d。距离的平方速度来计算,足够用于多种用途(如寻找最近的邻居的一个点)。

The argument method is not normally used. It is retained only for checking the validity of the software. If method = "interpreted" then the distances are computed using interpreted R code only. If method="C" (the default) then C code is used. The C code is somewhat faster.
参数method不能正常使用。它只会保留检查的软件的有效性。如果method = "interpreted"的距离计算仅使用解释R代码。如果method="C"(默认值),那么C代码使用。 C代码是稍快。


值----------Value----------

A square matrix whose [i,j] entry is the distance between the points numbered i and j.
一方阵的[i,j]项是点之间的距离编号i和j。


(作者)----------Author(s)----------


Pavel Grabarnik
<a href="mailto:pavel.grabar@issp.serpukhov.su">pavel.grabar@issp.serpukhov.su</a>
and
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>




参见----------See Also----------

crossdist, nndist, Kest
crossdist,nndist,Kest


实例----------Examples----------


   x <- runif(100)
   y <- runif(100)
   d <- pairdist(x, y)
   d <- pairdist(cbind(x,y))
   d <- pairdist(x, y, period=c(1,1))
   d <- pairdist(x, y, squared=TRUE)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-15 14:21 , Processed in 0.037122 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表