Hello,
 
I'm trying to play with the universal kriging example, and using the code as specified in the demos folder, but i get the follwing error message:
 
> x <- krige(log(zinc) ~ -1 + sqrt(dist)+ part.a + part.b,
+ ~ x + y, meuse, meuse.grid,
+ model = vgm(.149, "Sph", 700, .0674))
Error in eval(expr, envir, enclos) : Object "part.a" not found
 
 
Trying to fix it with the following solved that problem, but gave me another:
 
 
> x <- krige(log(zinc) ~ -1 + sqrt(meuse.grid$dist)+ meuse.grid$part.a + meuse.grid$part.b,
+ ~ x + y, meuse, meuse.grid,
+ model = vgm(.149, "Sph", 700, .0674))
Error in model.frame(formula, rownames, variables, varnames, extras, extranames,  :
        variable lengths differ
 
I'm not sure where the problem is as the lengths of the variables are the same:
 
> length(meuse.grid$part.a)
[1] 3103
> length(meuse.grid$part.b)
[1] 3103
> length(meuse.grid$dist)
[1] 3103

Any ideas about what might be going wrong?
 
Cheers,
 
femke

Reply via email to