# \donttest{
spatial_coord <- data.frame(
imagecol = c(1, 2, 3, 4, 5),
imagerow = c(5, 4, 3, 2, 1),
row.names = c("Spot1", "Spot2", "Spot3", "Spot4", "Spot5")
)
center_id <- "Spot3"
closest_ids <- random_region(spatial_coord, center_id, 3)
print(closest_ids)
# }
Run the code above in your browser using DataLab