-1

我有一个包含生物群及其地理信息的数据集:

结果2

ID  Latitude    Longitude
A   -3,5     -39,5833
A   -7,0167  -37,9667
A   -9,2258  -43,4631
B   -16,6667 -49,5
B   -15,4333 -55,75
B   -19,0333 -57,2167
C   -29,2    -58,1
C   -30      -59,5167
C   -34,5667 -59,1167

我使用 maptools 在地图上绘制这些点,这里的代码:

xlim<-c(min(results2$Longitude),max(results2$Longitude)) 
  ylim<-c(min(results2$Latitude),max(results2$Latitude))
  readShapeLines("americas_adm0.shp") -> shape
  plot(shape, xlim=xlim, ylim=ylim)
  par(new=TRUE)
  ## vamos aqui!!
  pontos<- data.frame(results2$Longitude,results2$Latitude)
  colnames(pontos)=c("Longitude","Latitude")
  points(pontos$Longitude, pontos$Latitude, pch=16, col=2, cex=1)

但我不知道如何为每个组划定多边形,并更改所研究组的颜色选项。

4

1 回答 1

-1

我不确定我理解“每组的多边形”是什么意思?您是否可能指的是所谓的“凸包”:在这种情况下,相当多的 GIS 包(例如 sp)应该提供功能......

于 2014-05-19T06:45:58.573 回答