distance(SpatialExtremes)
distance()所属R语言包:SpatialExtremes
Computes distance between pairs of locations
计算位置之间的距离对
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function computes euclidean distance or distance vector for each pair of a set of spatial locations.
该函数计算的每个空间位置的一组对的欧氏距离或距离向量。
用法----------Usage----------
distance(coord, vec = FALSE)
参数----------Arguments----------
参数:coord
A matrix representing the coordinates of each locations. Each row corresponds to one location.
一个矩阵,表示每个位置的坐标。每一行对应于一个位置。
参数:vec
Logical. If FALSE (default), the euclidean distance is computed. Otherwise, “distance vectors” are returned.
逻辑。如果FALSE(默认),欧氏距离计算。否则,“距离向量被返回。
值----------Value----------
If vec = FALSE, this function returns a vector that gives the euclidean distance for each pair of locations. Otherwise, this is a matrix where each column correspond to one dimension - i.e. longitude, latitude, ...
如果vec = FALSE,这个函数返回一个向量的欧氏距离,让每个对地方。否则,这是一个矩阵,其中的每一列对应于一维 - 即经度,纬度,...
(作者)----------Author(s)----------
Mathieu Ribatet
参见----------See Also----------
dist
dist
实例----------Examples----------
coords <- cbind(seq(0, 10, by = 2), seq(10, 0, by = -2))
distance(coords)
distance(coords, vec = TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|