[GRASSLIST:5250] Re: LSD program

Michael Barton michael.barton at asu.edu
Tue Jan 4 13:44:09 EST 2005


Thanks Craig.

I realize that R has the potential to be a powerful statistical companion to
GRASS. The reasons I didn't use R for this LDA routine are:

1. I don't know R command syntax. This seems to be a fairly steep learning
curve, though I am sure the results are worth the effort. While I keep
thinking it would be useful to learn it, I have so much on my plate that I
simply haven't had time. I should learn C too. It would encourage me to
tackle R if it had a menu-driven interface to augment the command line, as I
am familiar with a variety of other stat packages (SPSS, Systat, Statistica,
and JMP--the latter being my package of choice in a large part because of
the UI). So far, I haven't found one that works on my Mac (a menu that
primarily lets me cut and paste commands, and open help files is nice but
not sufficient).

2. Most GRASS users don't know R command syntax. I suspect that many of them
will echo my comments in #1. The LDA routine I did is pretty simple to use.
Hopefully, this will make it more accessible to GRASS users.

3. I'm not clear about this, but it sounds from recent comments to the GRASS
developer's list like R will not currently read GRASS 5.7/6 vector data. The
commands you list below, suggest that you are working with GRASS 5.4 (or
earlier) vector data and an associated PostgreSQL database. I hope I am
wrong about this.

Finally, perhaps you could offer some advice given your knowledge of R. LDA
is not a clustering technique, but a way to quantitatively measure the to
what extent geospatial data are clumped or dispersed (along the lines of
nearest neighbor analysis but without some of the drawbacks of NN). Is there
such a routine in R? And are there modules that measure in other ways the
degree to which geospatial data are clumped or dispersed (evenly or
randomly)? 

Thanks for the suggestion.

Michael Barton

On 1/4/05 10:12 AM, "Craig Aumann" <caumann at ualberta.ca> wrote:

> In glancing at your script, I wondered why you didn't just import the
> stuff into a statistical package like R and then use all the clustering
> routines it has.    See www.r-project.org
> 
> 
> 
> 
> ## Key commands in R are:
> 
> ## Load the packages to access the database, in particular the PgSQL ##
> database
> require(Rdbi)
> require(RdbiPgSQL)
> 
> ## Load some clustering routines
> 
> require(cluster)
> require(mclust)
> 
> 
> ### Connect to the database and read in a points data set "jogis"
> ## and read in the dataset "wells_att".
> 
> 
> conn <- dbConnect(PgSQL(), dbname="jogis", user="caumann")
> wells <- dbReadTable(conn, "wells_att")
> dbDisconnect(conn)
> 
> ## Now you can apply any clustering or kernel smoothing technique you
> want to the dataset.
> 
> If this is of any help, let me know and I can provide more details.
> Cheers!
> Craig
> 

______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton




More information about the grass-user mailing list