我该如何在R中绘制一组点周围的区域呢?例如,在地图上。
map('world')
map.axes()
p <- matrix(c(50, 50, 80, 100, 70, 40, 25, 60), ncol=2) # make some points
points(p, pch=19, col="red")
polygon(p, col="blue")
... 这使我得到了一个多边形,每个点都是其中一个顶点,但它看起来有些糟糕。有没有办法将多边形“平滑”成某种曲线呢?