[R-sig-Geo] R-stats - GRASS6

Markus Neteler neteler at itc.it
Tue May 31 15:47:31 CEST 2005


Dear list members,

I am currently trying out the new GRASS 6/R-stats interface.
I installed all software today (R-2.1.0, all interfaces, using
GRASS 6.1-CVS).

There is a little problem which I don't understand:

> library(spgrass6)
> G <- gmeta6()
> str(G)
List of 28
 $ GISDBASE         : chr "/ssi0/ssi/neteler/grassdata"
 $ LOCATION_NAME    : chr "spearfish60"
 $ MAPSET           : chr "neteler"
 $ GRASS_DB_ENCODING: chr "utf-8"
 $ DEBUG            : chr "0"
 $ MONITOR          : chr "x0"
 $ GRASS_GUI        : chr "text"
 $ projection       : chr "1 (UTM)"
[...]

> system("r.info -t landcover.orig")
datatype=CELL
> landcover <- readCELL6sp("landcover.orig", cat = TRUE)
Error in "names<-.default"(`*tmp*`, value = "landcover.orig") :
        'names' attribute [1] must be the same length as the vector [0]

# this works:
> landcover <- readCELL6sp("geology", cat = FALSE)
>

> lcov <- readCELL6sp("landcover.30m",cat = TRUE)
Error in "names<-.default"(`*tmp*`, value = "landcover.30m") :
        'names' attribute [1] must be the same length as the vector [0]


I was inspired by
 http://r-spatial.sourceforge.net/xtra/xtra.RHnw.html
and the upcoming article from Roger Bivand in the GRASS Newsletter Vol3.

Was there a change recently which makes category transfer fail?

Best regards

 Markus

-- 
Markus Neteler     <neteler itc it>       http://mpa.itc.it
ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18        -       38050 Povo (Trento), Italy




More information about the R-sig-Geo mailing list