Short Introduction to Geostatistical and Spatial Data Analysis with GRASS 6 and R statistical data language

[Table of contents]

Software

R-stats and the R/GRASS6 interface are separate packages:

Installation of R and R/GRASS geostatistics interface

Installation process (usually you need to login as "root").

I) First install R itself, check out the R FAQ for details.

II) We install directly from the Internet:

#start R or R-GUI:
R

# you need to be connected to the Internet to use these commands:


##### Non-Mac users:
install.packages("spgrass6", dependencies = TRUE)

##### Mac users:
install.packages("spgrass6", type="source", dependencies=TRUE)
You can update installed packages as well, recommended after some weeks/month:
update.packages()
R and the GRASS/R interface are ready for use now.

Usage

You need to start R in a GRASS terminal to make best use of the interface.
grass64

...

R
library(spgrass6)
# this will load some required packages...
G <- gmeta6()

#start the local help system in a Web browser (e.g., look at Packages -> 'spgrass6'):
help.start()

Since the GRASS/R interface completely changed for GRASS 6, we recommend to first read

Note: For PostgreSQL connection, see R and DBMS.

© 2005-2009 Markus Neteler
Last update: 2009-02-12