[R-sig-Geo] mcp calculation
Lutfor
rahmannorthampton at gmail.com
Fri Dec 6 22:04:42 CET 2013
Dear Mathieu,
Thanks for extending your kind help.
It works perfect with the example data.
However, I had difficulty when I wanted to use following data unless I
converted x, y corordinates to spatial data by the command of
SpatialPointsDataFrame. Please see commands below. I wonder is there any
other way to calculate MCP without converting SpatialPointsDataFrame.
mcpdata1<-read.csv("DataMCPKernel.csv",header=T)
attach(mcpdata1)
XY=mcpdata1[,c("x","y")]
#Convering your coordinates to spatial data
*rel2<-SpatialPointsDataFrame(XY, data=mcpdata1)*
cp2 <- mcp(rel2[,1], percent=100)
as.data.frame(cp2)
mcp.area(rel2[,1])
Data:
Stage x y
incubation 646395.1 5213765
incubation 646395.1 5213765
incubation 646395.1 5213765
incubation 646395.1 5213765
incubation 646382.9 5213765
incubation 646395.1 5213765
incubation 646238.7 5213946
incubation 646531.6 5213897
incubation 646408 5213765
incubation 646395.1 5213765
incubation 646395.1 5213765
Kind regards
Lutfor
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/mcp-calculation-tp7585219p7585297.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list