[STATSGRASS] latlon

Roger Bivand Roger.Bivand at nhh.no
Thu Dec 12 15:35:23 EST 2002


Hi Bodo,

On Thu, 12 Dec 2002, Bodo Ahrens wrote:

> Hi,
> the GRASS-R interface does not allow me to apply gmeta in a lat lon domain:
> 
> G<-gmeta(interp=FALSE)
> Error in seq.default(from = G$w + (G$ewres/2), to = G$e - (G$ewres/2),  :
>         invalid (to - from)/by in seq(.)
> In addition: Warning message:
> NAs introduced by coercion
> 
> ewres is set to zero!
> 
There is something strange going on here. Although you set interp=FALSE, 
the test getting the function to use the compiled interface is failing, so 
the interpreted gets used anyway. Please do:

> debug(gmeta)
> is.loaded("gmeta", PACKAGE="grassR")
> G<-gmeta(interp=FALSE)

and send the output. The R debugger lets you step through the function - 
you'll see that it jumps to the interpreted code (in which seq() is used) 
if "gmeta" isn't loaded, then after META is assigned (when you see ML <- 
length(META), enter print(META) - I guess that ll prints out fewer fields 
than the others, and that the values are not being set correctly for this 
case. The strangeness is why the interpreted code is being used - it looks 
as though library(GRASS) didn't find the current GRASS session.


> I tried this with GRASS R-library 1.11. If I remember correctly it was 
> possible in lat lon with an older lib.
> 
> Any comments, hints (of course it works is something like lambert ...)
> 

Thanks for this report - please tell us how you get on.

Roger

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




More information about the grass-stats mailing list