[R-sig-Geo] universal kriging gives error

temiz temiz at deprem.gov.tr
Fri Apr 13 15:46:01 CEST 2007


Edzer J. Pebesma wrote:
> temiz wrote:
>> hello
>>
>> when I try universal kriging, it gives this error:
>>
>>  > v.trend <- variogram(z~x+y,el4)
>>  > new.fit <- fit.variogram(v.trend, vgm(1,"Exp",300,1))
>>  > krige(el4$z~el4$x+el4$y,el4, model=new.fit, newdata=mask_SG)
>> Error in gstat.formula.predict(d$formula, newdata, na.action = 
>> na.action) :
>>         NROW(locs) != NROW(X): this should not occur
>> In addition: Warning messages:
>> 1: 'newdata' had 42705 rows but variable(s) found have 7998 rows
>> 2: 'newdata' had 42705 rows but variable(s) found have 7998 rows
>>
>> regards
>>
>>   
> Please use the form
>
> krige(z~x+y, el4, mask_SG, new.fit)
>
> as x+y need to be resolved from both el4 and mask_SG -- how to get 
> coordinates named el4$x from mask_SG otherwise?
> -- 
> Edzer
>
when I do it, it does not recognize x and y.

 > k1 = krige(z~x+y, el4, mask_SG, new.fit)
Error in eval(expr, envir, enclos) : object "x" not found

-- 
Ahmet Temiz


-- 
This message has been scanned for viruses and\ dangerous con...{{dropped}}




More information about the R-sig-Geo mailing list