[STATSGRASS] Any suggestions?

Roger Bivand Roger.Bivand at nhh.no
Tue Oct 17 09:12:31 EDT 2006


On Tue, 17 Oct 2006, Raffaele Morelli wrote:

> 2006/10/17, Roger Bivand <Roger.Bivand at nhh.no>:
> >
> > On Tue, 17 Oct 2006, Raffaele Morelli wrote:
> >
> > > Hi everybody.
> > >
> > > I am running Grass6 and R start doing some simple statistical analysis.
> > > I got my vectors connected to a database through a mysql driver.
> >
> > So the point/polygon geometries are in GRASS and the attribute data is in
> > the database? R could also read the attribute tables directly, rather than
> > pulling them through GRASS, if you like, though maintaining integrity will
> > need watching.
> 
> 
> Yes, attribute data are stored in a MySQL db.
> So I can read and plot those attributes without running R inside a GRASS
> session.
> Did I understand?

Yes, exactly. The geometries are stored in GRASS, is that correct?

> Actually I am trying spgrass6 using readVECT6, but I obtain this error
> Error in "row.names<-.data.frame"('*tmp*', value = NULL):
>  invalid lenght in "row.names"

For errors in R of any kind, please include the output of:

traceback()

issued immediately after the error.

In fact readVECT6 is just running v.out.ogr, so traceback() should show in 
which function and roughly where the problem occurs. So the first thing is 
to get the data you need (or a subset for testing) into R first, then 
handle the visualisation.

Roger

> 
> >
> > > I would like to start plotting maps with graphs on it so I need to fetch
> > > attribute data of layers and represent them as histogram or boxplot.
> > > Can you suggest me some resources?
> > >
> >
> > This isn't very clear - each geometry object has a single observation on
> > each attribute field, so the histograms (for each place - point/polygon)
> > are across multiple fields? To get boxplots, see symbols(), but a good
> > deal of massaging will need to be done to work across columns rather than
> > down them. For placing histograms, it may be you'll need to go to the
> > gridBase package, documented in Paul Murrell's R Graphics (CRC Press) and
> > in R News October 2003, Fig. 2 is suggestive of the flexibility.
> 
> 
> Ok, it wasn't.
> I would like to plot data fetched from multiple fields or from different
> layers. I am going to try both anyway.
> 
> Thanks for helping
> 

-- 
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 grass-stats mailing list