[R] question about krige code in R

From: Alessandro <alessandro.montaghi_at_unifi.it>
Date: Wed, 30 Jul 2008 15:43:21 -0700


Hi All,  

I have this question. I wish to create a kriging map with R but I haven't a auxiliary map. I have only one txt file with X, Y and Z records.

When I use this code:    

plot(variogram(Z~sqrt(X+Y), subground, cutoff=1800, width=10))

subground.or <- variogram(Z~sqrt(X+Y), subground, cutoff=1800, width=10)

subground.ovgm <- fit.variogram(subground.or, vgm(1, "Gau", 1000, 1))

subground.ok <- krige (Z~sqrt(X+Y), subground, subground.ovgm, nmax=40) *  

*[the original code is elevations.ok = krige(Z~1, elevations, dem, elevations.ovgm, nmax=80) ]  

when I use this one there is this message (with my data setting), because I have only txt file and I haven't a DEM ascii file:  

"Error in proj4string(newdata) : proj4string only works for class(es extending) Spatial."  

Is it possible use only one file with krige?  

Thank you  

Ale  

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 Jul 2008 - 22:49:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jul 2008 - 00:33:00 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive