[R-sig-Geo] Testing if a point-pattern is on a regular grid

Roger Bivand Roger.Bivand at nhh.no
Wed Jan 6 08:25:01 CET 2010


On Wed, 6 Jan 2010, Pierre Roudier wrote:

> Dear list,
>
> I'm looking for an easy way to test if a point pattern (I got a data
> frame of x and y coordinates) is on a regular grid or not.
>
> I'm aware of the gridded() function in sp(), but this function is
> devoted to assign rather than to test, as far as I know. I'm pretty
> sure there's an easy way to do that though....

Use try(points2grid()) - if this returns an object of class "try-error", 
the points do not lie on a grid.

Roger

>
> Any suggestions ?
>
> Thanks,
>
> Pierre
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
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 at nhh.no



More information about the R-sig-Geo mailing list