[R-sig-Geo] fitting variogram in regrssion kriging

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Sep 25 11:04:04 CEST 2014


We can only speculate, but mask_10m.asc may contain missing values, and
not refer to rainfall (directly).

On 09/25/2014 09:57 AM, Tomislav Hengl wrote:
> 
> Helen,
> 
> Most likely you need to subset the missing values by using e.g.
> "precip[!is.na(precip$annaul_2001),]", but it is difficult to see if you
> maybe have a typo with variable names.
> 
> Try using "traceback()" and check the amount of missing values by using
> e.g. "summary(is.na(precip$annaul_2001))" and/or
> "summary(complete.cases(precip))".
> 
> HTH,
> 
> T. (Tom) Hengl
> Researcher @ ISRIC - World Soil Information
> Url: http://www.wageningenur.nl/en/Persons/dr.-T-Tom-Hengl.htm
> Network: http://profiles.google.com/tom.hengl
> Publications: http://scholar.google.com/citations?user=2oYU7S8AAAAJ
> 
> 
> On 25-9-2014 7:57, Helen Chen wrote:
>> Hi,
>>
>> I am following the code provide from this link:
>> http://spatial-analyst.net/wiki/index.php?title=Regression-kriging_guide)
>> with my own data.
>>
>> but I got stuck in fitting variogram, the error message is as follow:
>>
>>> vgm_precip_r <- fit.variogram(variogram(annaul_2001~mask_10m.asc,
>> precip), model=null.vgm)
>> Error in na.fail.default(list(annaul_2001 = c(945.134, 648.716,
>> 559.562,  :
>>    missing values in object
>>
>> But I have checked that there is no missing value in my rainfall data.
>> Any
>> help would be very much appreciated.
>>
>> Helen
>>
>>     [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> 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

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140925/eac885b7/attachment.bin>


More information about the R-sig-Geo mailing list