Tag Info

New answers tagged

3

Just extract the upper triangular part of points_matrix and use the column sums as a criterion to remove the points: points_matrix <- gWithinDistance(points, dist = 20, byid = TRUE) points_matrix[lower.tri(points_matrix, diag=TRUE)] <- NA points_matrix # 1 2 3 4 5 # 1 NA FALSE FALSE FALSE FALSE # 2 NA NA FALSE FALSE FALSE # 3 NA ...



Top 50 recent answers are included