[R-sig-Geo] GRASS vector attribute table read into R
Roger Bivand
Roger.Bivand at nhh.no
Tue Oct 19 22:24:57 CEST 2010
On Mon, 18 Oct 2010, stephen sefick wrote:
> I would like to just read in a vector table that is stored in the
> GRASS dbf format into R. Is there a way that I am over looking with
> the spgrass6 package? I can just go to the dbf file of the grass
> mapset, but I was looking for a better option. Thanks in advance.
> kindest regards,
Stephen,
Do you mean read the GRASS vector, or just the DBF file? If the vector
with its attributes, readVECT6() in spgrass6, which I think you know of.
Otherwise, perhaps:
zz <- execGRASS("db.select", parameters=list(table="newbugs"),
intern=TRUE)
con <- textConnection(zz)
zzz <- read.table(con, header=TRUE, sep="|")
close(con)
Hope this helps,
Roger
>
> --
> Stephen Sefick
> ____________________________________
> | Auburn University |
> | Department of Biological Sciences |
> | 331 Funchess Hall |
> | Auburn, Alabama |
> | 36849 |
> |___________________________________|
> | sas0025 at auburn.edu |
> | http://www.auburn.edu/~sas0025 |
> |___________________________________|
>
> Let's not spend our time and resources thinking about things that are
> so little or so large that all they really do for us is puff us up and
> make us feel like gods. We are mammals, and have not exhausted the
> annoying little problems of being mammals.
>
> -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal science."
>
> -Robert Gentleman
> _______________________________________________
> 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