Rom*_*rik 6 geometry r euclidean-distance
我试图绘制一些圆圈,我有点希望它们会与某些点交叉,唉...
library(maptools)
library(plotrix)
xy <- matrix(runif(20, min = -100, max = 100), ncol = 2)
distance <- spDistsN1(xy, xy[1, ])
plot(0,0, xlim = c(-100, 100), ylim = c(-100, 100), type = "n")
points(data.frame(xy))
points(xy[1, 1], xy[1, 2], pch = 16)
draw.circle(xy[1, 1], xy[1, 2], radius = distance)
Run Code Online (Sandbox Code Playgroud)
上面的代码执行以下操作:
