Re: [R-sig-Geo] Universal Kriging and raster library

2012-10-22 Thread Robert J. Hijmans
Hi Maurizio, Thank you for the very clear example. I think this fixes it: names(r) = 'elev' UK<-interpolate(r, gUK, xyOnly=FALSE) as in: ##UNIVERSAL KRIGING (working!!) vu<-variogram(log(zinc)~elev,meuse) mu<-fit.variogram(vu,vgm(1,"Sph",300,1)) gUK<-gstat(NULL,"log.zinc",log(zinc)~elev,meuse,mo

Re: [R-sig-Geo] Universal Kriging and raster library

2012-10-22 Thread Edzer Pebesma
In your example, I see: > UK<-interpolate(r,gUK) Error in eval(expr, envir, enclos) : object 'elev' not found it seems that 'elev' is not present in r. On 10/23/2012 08:11 AM, Maurizio Marchi wrote: > Oh, ok, I'm sorry, I had not understand the "self-contained" expression. > Anyway, a self-conta

Re: [R-sig-Geo] Universal Kriging and raster library

2012-10-22 Thread Maurizio Marchi
Oh, ok, I'm sorry, I had not understand the "self-contained" expression. Anyway, a self-contained exaple can be this: ## BEGINNING library(gstat) library(rgdal) library(raster) data(meuse) coordinates(meuse) = ~x+y r <- raster(system.file("external/test.grd", package="

Re: [R-sig-Geo] Universal Kriging and raster library

2012-10-22 Thread Maurizio Marchi
Hi Robert, first of all, thank you for answering my question :) that's my script with the error message of R. Just to make you understand better: 'MED_MED' is the average temperature of my location of study; 'stazioniABR' is the database 'dtm' is the Digital Terrain Model that i use as raster backg

Re: [R-sig-Geo] Universal Kriging and raster library

2012-10-21 Thread Robert J. Hijmans
Maurizio, Can you provide a simple self-contained example of what works and what does not work? Robert On Wed, Oct 17, 2012 at 12:54 PM, Maurizio Marchi < mauriziomarch...@gmail.com> wrote: > Hallo everybody! > It's the first time I write in this list and I hope to be clear enough. > Last week I

[R-sig-Geo] Universal Kriging and raster library

2012-10-17 Thread Maurizio Marchi
Hallo everybody! It's the first time I write in this list and I hope to be clear enough. Last week I succeeded in performing ordinary, universal and co-Kriging method using the 'gstat' and the 'rgdal' library. Now I decided to try to use the 'raster' library instead of the 'rgdal' and I have no pro