Skip to content
Back to formatted view

Raw Message

Message-ID: <1386363882098-7585297.post@n2.nabble.com>
Date: 2013-12-06T21:04:42Z
From: Lutfor
Subject: mcp calculation
In-Reply-To: <52967ED0.2090306@ase-research.org>

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.