# Example with geographic coordinates (Haversine distance)
coords <- data.frame(
long = c(-122.4194, -122.4195, -122.4196),
lat = c(37.7749, 37.7740, 37.7741)
)
coords <- as.matrix(coords)
result <- brute_force_thinning(coords, thin_dist = 0.1, trials = 5)
print(result)
# Example computing Euclidean distance
result_euclidean <- brute_force_thinning(coords, thin_dist = 1, trials = 5, euclidean = TRUE)
print(result_euclidean)
Run the code above in your browser using DataLab