[R] still have problem with krige and border option

Lionel l.bargeot at educagri.fr
Tue Apr 16 18:08:04 CEST 2002


Dear all,

I would like to estimate rainfall with the krige function. First, I produce a 
polygon of my region of interest (where poly_test.txt is a x,y suite of 
points defining a polygon, obtained with the grass v.out.ascii command) :

user>border_limite<-read.table("/home/lionel/rwork/poly_test.txt",header=FALSE)
user>polygone<-list(x=border_limite[,1],y=border_limite[,2])

So now I have a list of x,y coordinates to limit my work area.
If I call the function krige with extrap=FALSE like this

user>grid2.krige<-krige(grid2.point,logtab.point,'lz', 
logtab.Exp,maxdist=NULL,extrap=FALSE)

[ where grid2.point is a point object to store prediction, logtab.point a 
point object containing points data, 'lz' is the variable name in 
logtab.point, logtab.Exp is a variogram object ]

all works quiet well, but I am limited to a convex hull inside the limite 
designed by points of measure.

If I set extrap=TRUE, all works, but values are estimated all over my area.

Now if use the polygon I defined, and specifie it in the function call
user>grid2.krige<-krige(grid2.point,logtab.point,'lz', 
logtab.Exp,maxdist=NULL,extrap=TRUE,border=polygone)
all points in the area are estimated.

I've tried to put extrap=FALSE with border, but then there is no result, and 
no points are found.
Here is my polygon definition:
$x
[1] 2272048 2275274 2296044 2293826 2280517 2272048
$y
[1] 781270.4 801031.7 795385.6 773003.0 765945.4 781270.4

So my question is, do you see any stupid mistake I can make ?

last point (optional!) about krige.G
I also tried to use krige.G from the grass package, but for the moment I have 
a strange error message : (where G is obtained with gmeta() command)

user>grid2.krige<-krige.G(logtab.point,"lz",logtab.Exp,G)
Error in surf.gls(0, expcov, x = point.obj$x, y = point.obj$y, z = at.val,  : 
        Rank failure in Choleski decomposition

I've just reported my point and variogram definition in the options. Perhap's 
is there a small difference between parameters when they are passed to krige 
function but I don't see wich.

Thanks in advance for all kind of help

Lionel

-- 
CNERTA-ENESAD
4 rue champs-prevois
batiment grand-champs
21000 Dijon
tel:03.80.77.28.49
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list