[R] polygon class in splancs package

From: Elke Moons <elke.moons_at_uhasselt.be>
Date: Mon, 17 Dec 2007 14:33:29 +0100


Dear forum,  

I would like to use the kernel2d or spkernel2d in the Splancs-package, but it does not recognize my polygon data.  

"Error in kernel2d(as.points(ptsbin), polygonprov, h0 = 2, nx = 100, : " is the error message.

        Invalid poly argument  

The data are defined as follows:

polgonprov<-list(x=polyprov$X, y=polyprov$Y) with X and Y coordinates in the Lambert1972 notation. The points are defined in the same coordinate system and it does recognize them, so I don't suppose that is the problem.  

I can also draw the province polygon by:

plot(c(192800,254100),c(154100,221800),type="n")

polygon(polyprov$X,polyprov$Y)  

Can someone help me with this? Or explain to me how exactly is the polygon class defined in splancs? I also tried with

Polygonprov<-Polygon(list(x=polyprov$X,y:polyprov$Y)) but that does not seem to work either.  

Thanks already in advance.

Kind regards,    

Elke  


Elke Moons, PhD

Transportation Research Institute

Belgium

E-mail: <mailto:elke.moons_at_uhasselt.be> elke.moons_at_uhasselt.be  

        [[alternative HTML version deleted]]



R-help_at_r-project.org 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. Received on Mon 17 Dec 2007 - 13:38:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Dec 2007 - 20:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.