Dear list,
I have a question regarding the included polygon in the khat function of the
splancs library defining the area where points appear.
I have not only one simple polygon included, my map includes several islands.
I read my map which was a shape file by readShapeSpatial of the maptools
library.
Then I split up the SpatialPolygonsDataFrame into the included polygons by
coor <- NULL
for (i in 1:[number of polygons]) coor<-
rbind(coor,m...@polygons[[1]]@polygons[[...@coords)
I am using now this newly generated polygon "coor" in the khat command.
k_funk_ca <- khat(as.points(cases), coor,s=0:1000)
I do not know if there is a problem using multiple polygons that way or if khat
produces then only results for the "first" polygon or even completely wrong
results.
Does anyone know the answer?
Thanks a lot,
Sven Schmiedel
PhD student at Copenhagen Unversity
Danish Cancer Society
Institute for Cancer Epidemiology
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.