[R-sig-Geo] error calling gstat::idw.locations

Edzer Pebesma edzer.pebesma at uni-muenster.de
Wed Apr 4 18:26:21 CEST 2012


That is probably because idw.locations is not exported in the package
NAMESPACE. I would try instead:

loc.idw <- idw(value~1, NARR, loc, idp = 1.0, debug.level = 1)

On 04/04/2012 05:10 PM, Anthony Fischbach wrote:
> I receive the following error after issuing the function call below with the
> following objects.
> Please advise.
> 
> #### Objects ##
> ## NARR a SpatialPointsDataFrame containing values to be interpolated
>           coordinates    value
> 1    (-170.312, 70.5) 1.141060
> 2    (-170.125, 70.5) 1.128586
> 3 (-170.312, 70.6875) 1.399495
> 4 (-170.125, 70.6875) 1.372585
> 
> ## loc a SpatialPointsDataFrame with a point onto which I wish to
> interpolate the NARR values
>       coordinates value
> 1 (-170.27, 70.6)    NA
> 
> #### Function Call ##
> loc.idw<-idw.locations(formula=value~1, locations=NARR,  newdata=loc, idp =
> 1.0, debug.level = 1)
> 
> #### Error text ##
> Error: could not find function "idw.locations"
> 
> #### sessionInfo() ##
> R version 2.15.0 (2012-03-30)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
> 
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252   
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
> [5] LC_TIME=English_United States.1252    
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base     
> 
> other attached packages:
> [1] gstat_1.0-10    spacetime_0.6-2 xts_0.8-6       zoo_1.7-7      
> sp_0.9-98       RCurl_1.91-1.1  bitops_1.0-4.1 
> 
> loaded via a namespace (and not attached):
> [1] grid_2.15.0    lattice_0.20-6 tools_2.15.0  
> 
> -----
> Tony Fischbach, Wildlife Biologist
> Walrus Research Program
> Alaska Science Center
> U.S. Geological Survey
> 4210 University Drive
> Anchorage, AK 99508-4650
> 
> AFischbach at usgs.gov
> http://alaska.usgs.gov/science/biology/walrus
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/error-calling-gstat-idw-locations-tp7436818p7436818.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> 
> _______________________________________________
> 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
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list