piper-class: Class 'piper'

Description Usage Arguments Methods (by generic) Slots Author(s) References Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'piper'
initialize(.Object, l, ..., call = NULL, pt.col = NULL)

## S4 method for signature 'piperplot'
labelAxes(x, cex.axis = 0.35, side = -1, ...)

## S4 method for signature 'piper'
plot(x, type = "p", cex = 0.75, ...)

## S4 method for signature 'piper'
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

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

cex

magnification to be used for symbols relative to the current setting of 'cex', see help("par")

object

an object of class piper

Methods (by generic)

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

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)

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

Author(s)

Myles English myles@rockhead.biz

References

A. Zaporozec, “Graphical interpretation of water quality data,” Ground Water 10, no. 2 (1972): 32–43.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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))

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

# change symbols and colours to differentiate water type groups
lp@pt.pch = c(2,2,4,4,4)
lp@pt.col = c(0,1,0,1,2)

# use larger symbols
plot( lp, main="Piper-Hill Diagram of Water Quality", cex=1.4 )

Example output

Class "piper" [package "hydrogeo"]

Slots:
                                                                            
Name:         Ca        Mg        Cl       SO4       IDs    pt.col    pt.pch
Class:    vector    vector    vector    vector    vector    vector    vector
                                                                            
Name:    anion.x   anion.y  cation.x  cation.y diamond.x diamond.y      size
Class:    vector    vector    vector    vector    vector    vector   numeric
                
Name:       call
Class:      call

Extends: "piperplot"
[1] TRUE
[1] TRUE

hydrogeo documentation built on May 2, 2019, 6:34 a.m.