I am working to test whether points are clustering as a result of density of those points or irregardless of density, in this case clustering (broods of juvenile shorebirds).
I have location data in discrete time steps for multiple individuals. I am hoping to calculate the average distance between all combinations of two points at each time step. What tools are available to do this?
I have tried to accomplish this within the dplyr package, but have not had much luck. I know this will likely create a large matrix of these points, hence why I would want to calculate a statistic such as average from it.
my data look like this: (with Lat and Long in UTM's, one location per brood, per date)
> 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))
I want to: 1) produce a measure of distance between all individuals at each time step 2) be able to eventually plot these values to test for effects of density on these distances