我正在测试点是否由于这些点的密度而聚集,或者不管密度如何,在这种情况下都是聚集(少年水鸟的卵)。
我有多个人的离散时间步长的位置数据。我希望在每个时间步计算两个点的所有组合之间的平均距离。有哪些工具可以做到这一点?
我已经尝试在dplyr软件包中完成此任务,但是运气不佳。我知道这可能会创建这些点的大矩阵,因此为什么我要从中计算出诸如平均值之类的统计数据。
我的数据如下所示: (在UTM中使用Lat和Long,每个日期每个育雏一个位置)
> dput(dista)
structure(list(Plot = c("S", "S", "S", "S", "S", "S", "S", "S",
"S", "S", "S", "S", "S", "S", "S", "S", "S", "S", "S", "S", "S",
"S", "S", "S", "S", "S", "S"), Brood = c("GB03", "GB03", "GB03",
"GN01", "GN01", "GN01", "GN01", "GN01", "GN01", "GN01", "GN02",
"GN02", "GN02", "GN02", "GN02", "GN02", "GN02", "GN02", "GN02",
"GN02", "GN02", "GN02", "GN02", "GN02", "GN02", "GN03", "GN03"
), Day = c("6/17/2019", "6/19/2019", "6/22/2019", "6/3/2019",
"6/5/2019", "6/7/2019", "6/8/2019", "6/10/2019", "6/12/2019",
"6/14/2019", "6/3/2019", "6/7/2019", "6/8/2019", "6/12/2019",
"6/14/2019", "6/17/2019", "6/19/2019", "6/22/2019", "6/24/2019",
"6/26/2019", "6/28/2019", "7/1/2019", "7/3/2019", "7/8/2019",
"7/10/2019", "6/18/2019", "6/20/2019"), Lat = c(601701.2, 601640.2,
601806.2, 602398.8, 602457.3, 602447.8, 602529.2, 602467.4, 602420.4,
602422.3, 602124.9, 601706.6, 601791.2, 601570.3, 602221.4, 602867.3,
602069.7, 602065.6, 601995.5, 602603.3, 602034.2, 601878.1, 602246.5,
602452.9, 602203.3, 601476.8, 601719.9), Long = c(6778175L, 6778016L,
6778143L, 6778541L, 6778558L, 6778629L, 6778700L, 6778526L, 6778538L,
6778440L, 6778510L, 6778172L, 6778296L, 6777853L, 6778437L, 6778700L,
6778513L, 6778465L, 6778471L, 6780454L, 6777941L, 6778173L, 6777624L,
6778407L, 6778204L, 6777993L, 6778037L)), class = "data.frame", row.names = c(NA,
-27L))
我要:1)在每个时间步长测量所有个体之间的距离 2)最终能够绘制这些值以测试密度对这些距离的影响