Dear friends,
  I have a .shp file of region boundary, and i want to use it as the polygon
in the khat(splancs) function, but it goes wrong.
# khat(pts,poly,s,newstyle=FALSE)

guichi<-readShapePoly("d:/d/guichi2.shp")  # read the shp data  of region
boundary
guichi2<-Polygon(coordinates(guichi), hole=as.logical(NA))  #generate the
polygon
case.khat<-khat(pointdata,guichi2,seq(0,23000,500))  #wrong???
Error in poly[, 1] : subset can't be read

 I think there must be some misusage in the argument
"guichi2<-Polygon(coordinates(guichi), hole=as.logical(NA)) ",.
 Can anybody tell me how to generate the correct polygon which can be used
in the khat function?
Thanks.

-- 
With Kind Regards,

oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[***********************************************************************]
Zhi Jie,Zhang ,PHD
Tel:86-21-54237149   epistat@gmail.com
Dept. of Epidemiology,school of public health,Fudan University
Address:No. 138 Yi Xue Yuan Road,Shanghai,China
Postcode:200032
[***********************************************************************]
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::

	[[alternative HTML version deleted]]


