Learn R Programming

geoR (version 1.2-5)

plot.geodata: Exploratory Geostatistical Plots

Description

This function produces a $2 \times 2$ graphics display with the following plots: the first indicates spatial locations, the second is a 3-D plot with spatial locations and associated data values (or a histogram of the data), and the last two shows data against the X and Y coordinates.

Usage

## S3 method for class 'geodata':
plot(x, coords=x$coords, data = x$data,
             borders = NULL, trend="cte", lambda = 1, col.data = 1,
             weights.divide = FALSE, window.new = FALSE, ...)

Arguments

x
a list containing elements coords and data described next. Typically an object of the class "geodata" - a geoR data-set. If not provided the arguments coords and data must
coords
an $n \times 2$ matrix containing in each row Euclidean coordinates of the n data locations. By default it takes the element coords of the argument geodata.
data
a vector with data values. By default it takes the element data of the argument geodata.
borders
If an $n \times 2$ matrix or data-frame with the borders of the area is provided, the borders are included in the first plot.
trend
specifies the mean part of the model. The options are: "cte" (constant mean - default option), "1st" (a first degree polynomial on the coordinates), "2nd" (a second degree polynomial on the coordinates),
lambda
value of the Box-Cox transformation parameter. Two particular cases are $\lambda = 1$ which corresponds to no transformation and $\lambda = 0$ corresponding to the log-transformation.
col.data
indicates the column number for the data to be plotted. Only valid if more than one data-set is available i.e., if the argument data is a matrix.
weights.divide
if a vector of weights with the same length as the data is provided each data is divided by the corresponding element in this vector. Defaults to NULL.
window.new
logical. If TRUE a new graphic device is openned, otherwise the current one is used. Defaults to FALSE.
...
further arguments to be passed to the function scatterplot3d.

Value

  • A plot is produced on the graphics device. No values are returned.

Details

By default, this function requires the package scatterplot3d in order to produce a 3-D plot with data locations and coordinates. If this package is not available an histogram of the data replaces the 3-D plot.

References

Further information about geoR can be found at: http://www.maths.lancs.ac.uk/~ribeiro/geoR.

See Also

points.geodata, scatterplot3d.

Examples

Run this code
if(is.R()) data(s100)
plot(s100)

Run the code above in your browser using DataLab