An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20050519/0fad6d65/attachment.pl>
kriging inside borders
3 messages · Chloe ARCHINARD, Roger Bivand, Paulo Justiniano Ribeiro Jr
On Thu, 19 May 2005, Chloe ARCHINARD wrote:
Hello, I'm using geoR package to compute kriging with the function krige.conv() and I used maptools (read.shape () + Map2poly () ) and splancs (borders) packages to include a object of class polylist for the attribute borders.
But I've got this message of error when 'borders' is in krige.conv () : krige.conv: there are no prediction locations inside the borders. My polylist is not good? The coordinates seam to be OK when I draw a map with this polylist object. And if I use 'borders' in the contour function : message error is :
Error in as.data.frame.default(borders) : can't coerce class "polylist" into a data.frame
Firstly, it does help if the exact commands are given, rather than your
choice of them. I think the main issue here is that a polylist object is a
list of matrices with attributes, not a matrix. If your polylist object
is:
x <- Map2poly(read.shape("my.shp"))
what is length(x)? If it is 1, you may be able to say x[[1]] to extract
the first matrix in the list, but even then it may not work. If you can
show us the commands you are giving, and the length of your polylist
object, it should be possible to find something that works.
If someone could help me, thanks a lot!
Chlo? Archinard
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no
Hi There are a few exemples of kriging inside borders in the geoR tutorials section available at: http://www.est.ufpr.br/geoR Basically you can use polygrid(), althouhg there are other mechanisms available. polygrid() relies on a splancs function internaly Please have a look and if the problem persists please contact me preferelably with some dumpoed workspace and scripts best P.J.
On Thu, 19 May 2005, Chloe ARCHINARD wrote:
Hello, I'm using geoR package to compute kriging with the function krige.conv() and I used maptools (read.shape () + Map2poly () ) and splancs (borders) packages to include a object of class polylist for the attribute borders. But I've got this message of error when 'borders' is in krige.conv () : krige.conv: there are no prediction locations inside the borders. My polylist is not good? The coordinates seam to be OK when I draw a map with this polylist object. And if I use 'borders' in the contour function : message error is : Error in as.data.frame.default(borders) : can't coerce class "polylist" into a data.frame If someone could help me, thanks a lot! Chlo? Archinard -- passerelle antivirus du campus CNRS de Montpellier -- [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Paulo Justiniano Ribeiro Jr LEG (Laborat?rio de Estat?stica e Geoinforma??o) Departamento de Estat?stica Universidade Federal do Paran? Caixa Postal 19.081 CEP 81.531-990 Curitiba, PR - Brasil Tel: (+55) 41 3361 3573 Fax: (+55) 41 3361 3141 e-mail: paulojus at est.ufpr.br http://www.est.ufpr.br/~paulojus