Learn R Programming

hydrogeo (version 0.4-1)

piper-class: Class piper

Description

Objects of this class are plotable as Piper-Hill diagrams. A dataframe of major ions as percentages can be used to initialise a piper object.

Usage

"initialize"(.Object, l, ..., call = NULL, group = NULL, wt.col = NULL, pt.col = NULL)
"labelAxes"(x, cex.axis = 0.35, side = -1, ...)
"plot"(x, type = "p", ...)
"show"(object)

Arguments

.Object
object of class piper
l
list of data, see 'Examples' below
...
additional arguments, as for piper
call
the call that asked for the new piper object
group
(untested) Object of class vector, a second factor to group by, to allow plotting on different plots
wt.col
(untested) Water type colours
pt.col
Object of class vector of colours for points
x
an object of class piperplot
cex.axis
magnification to be used for axis annotation relative to the current setting of 'cex', see help("par")
side
integer between 1 and 10 specifying which side to lable, the default is to label all
type
what type of plot should be drawn, only "p" for *p*oints is useful
object
an object of class piper

Methods (by generic)

  • initialize: Initialiser
  • labelAxes: Lable the axes
  • plot: Plot an object of class piper
  • show: Show an object of class piper

Slots

Ca
Object of class vector --- Calcium
Mg
Object of class vector --- Magnesium
Cl
Object of class vector --- Chloride
SO4
Object of class vector --- Sulphate
WaterType
Object of class vector --- factor for grouping samples
anion.x
x coordinate of the point on the anion triangle (internal)
anion.y
y coordinate of the point on the anion triangle (internal)
cation.x
x coordinate of the point on the cation triangle (internal)
cation.y
y coordinate of the point on the cation triangle (internal)
diamond.x
x coordinate of the point on the diamond (internal)
diamond.y
y coordinate of the point on the anion diamond (internal)
group
Object of class vector Another way of grouping other than WaterType
IDs
Object of class vector of sample identifiers
pt.col
Object of class vector of colours for points
pt.pch
Object of class vector of symbols for points
call
Object of class character --- call that created it

References

A. Zaporozec, ``Graphical interpretation of water quality data,'' Ground Water 10, no. 2 (1972): 32--43.

Examples

Run this code
showClass("piper")

l <- list( Ca = c(43,10,73,26,32),
           Mg = c(30,50,3,14,12),
           Cl = c(24,10,12,30,43),
           SO4 = c(24,10,12,30,43),
           WaterType = c(2,2,1,2,3),
           IDs = c("A","B","C","D","E") )

lp <- piper(l)
plot( lp, main="Piper-Hill Diagram of Water Quality" )

Run the code above in your browser using DataLab