[R-sig-Geo] krige error
Matevž Pavlič
matevz.pavlic at gi-zrmk.si
Mon Aug 22 12:36:27 CEST 2011
Hi, thanks for the help.
Class says as follows :
> class(DF)
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
> class(grd)
[1] "SpatialPixels"
attr(,"package")
[1] "sp
Anyway, the problem was, as Jan Olav Skoien suggested, with the zerodist().
Tnx, m
-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Jon Olav Skoien
Sent: Monday, August 22, 2011 9:49 AM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] krige error
It is difficult to know exactly what happens without seeing a reproducible example, but did you check the results of zerodist(DF) and DF[-zerodist(DF)[,1],]? The error below can come if there are no points that are within the limits of zerodist, not sure if the error in your first email could have a similar reason.
loadMeuse()
zerodist(meuse)
meuse[-zerodist(meuse)[,1],]
vmod = vgm(1, "Exp", 500, 0)
kres = krige(zinc~1, meuse[-zerodist(meuse)[,1],], meuse.grid, vmod)
Cheers,
Jon
On 20-Aug-11 17:13, Matevž Pavlič wrote:
> What i found out so far is that it has to be something with data...i raplaced just the column in other krige code and i got the same error. I also got :
>
>> Mag.K<-krige(MGCN_IGRF~1, DF[-zerodist(DF)[,1],], grd, vmf, nmax=nmx)
> Error in gstat.formula(d$formula, d$data) :
> no response variable present in formula
>
> Krigging data is as follows :
>>> quantile(DF$MGCN_IGRF, seq(0,1,by=0.1))
> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
> -351.960 -113.550 -103.130 -97.210 -90.970 -84.215 -75.032
> -60.790 -42.740 -21.326 500.400
>
> Can the negaiteve values have this effect?
>
> regards, m
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list