2 Starting a Session and Loading Data

2.1 Loading the package

After starting an R session, load geoR with the command library (or require). If the package is loaded correctly a message will be displayed.


  > library(geoR)

If the installation directory for the package is the default location for R packages, type:


  > library(geoR, lib.loc="PATH_TO_geoR")

where ‘"PATH_TO_geoR"’ is the path to the directory where geoR was installed.

2.2 Using data

Typically, data are stored as an object (a list) of the class geodata. An object of this class contains two obligatory elements: the coordinates of data locations as first element ($coords) and the data values as second element ($data), which can be a vector or a matrix. Objets of the class geodata may have other elements such as covariates and coordinates of the borders of the study area.

We refer to the documentation for the functions as.geodata and read.geodata for more information on how to import/convert data and on the definitions for the class "geodata". Check http://www.leg.ufpr.br/geoR/importingASCII.html for information on how to read data from an ASCII (text) file.

There a a few data-sets included in the package distribution. For the examples included in this document we use the data set s100 included in the geoR distribution. To load this data type:


  > data(s100)

The list of all data-sets included in the package is given by data(package=’geoR’).