Re: [R] gstat no longer handles 1-D data

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Sat 06 May 2006 - 18:28:02 EST


On Fri, 5 May 2006, Rick Bilonick wrote:

> Has anyone else noticed that gstat no longer handles 1-D data?
>

Thanks for this report, writing directly to the package maintainer or the R-sig-geo list might have been a better choice than R-help

The problem does exist, but can be worked round by inserting a constant second dimension:

library(gstat)
data(meuse)
meuse$constY <- rep(1,nrow(meuse))
coordinates(meuse) = ~ x + constY
variogram(zinc ~ 1, data=meuse)

also leaving out the location formula, and using the coordinates in the SpatialPointsDataFrame object

Roger

> > library(gstat)
> > coordinates(pm.df) <- ~x
> Error in validObject(.Object) : invalid class "SpatialPoints" object:
> spatial.dimension should be 2 or more
> > variogram(pm~1,~x,data=pm.df)
> Error in validObject(.Object) : invalid class "SpatialPoints" object:
> spatial.dimension should be 2 or more
>
> The variogram call used to work. It stopped working when I upgraded to
> the latest version of gstat.
>
> Rick B.
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand@nhh.no

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat May 06 18:31:04 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 06 May 2006 - 20:09:58 EST.

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