Display Plots for Two Parts from a Compositional Data Set

Description

Displays a panel of four plots for a pair of parts from a compositional data set. The displays consist of a log10 scaled x-y plot, a boxplot of the corresponding values of ilr(x,y) annotated with the robust ilr stability measure, and sequential index and ECDF plots of the ilr values. The display is based on those used in Filzmoser et al. (2010).

Usage

1
2
gx.plot2parts(xx1, xx2, x1lab = deparse(substitute(xx1)), 
	x2lab = deparse(substitute(xx2)), cex = 0.8, ifwarn = TRUE, ...)

Arguments

xx1

a column vector from a matrix or data frame of compositional data,
xx1[1], ..., xx1[n].

xx2

another column vector from the matrix or data frame of compositional data, xx2[1], ..., xx2[n]. xx1 and xx2 must be of identical length, n.

x1lab

the x-axis title, by default the variable name, deparse(substitute(xx1)). It is often desirable to replace this with a more informative title, e.g.,
x1lab = "Cu (mg/kg) in stream sediment".

x2lab

the y-axis title, by default the variable name, deparse(substitute(xx2)). It is often desirable to replace this with a more informative title, e.g.,
x2lab = "Zn (mg/kg) in stream sediment".

cex

by default the size of the text for data set size, N, and the robust ilr stability is set to 80%, i.e. cex = 0.8, and may be changed if required.

ifwarn

by default ifwarn = TRUE which generates a reminder/warning that when carrying out analyses of compositional data all data must be in the same measurement units. The message can be suppressed by setting ifwarn = FALSE.

...

further arguments to be passed to methods. For example, the size of the axis scale annotation can be change by setting cex.axis, the size of the axis titles by setting cex.lab, and the size of the plot title by setting cex.main. For example, if it is required to make the plot title smaller, add cex.main = 0.9 to reduce the font size by 10%.

Note

Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see ltdl.fix.df.

Any data vectors (rows) containing NAs are removed prior to computation.

Author(s)

Robert G. Garrett

References

Filzmoser, P, Hron, K. and Reimann, C., 2010. The bivariate statistical analysis of environmental (compositional) data. Science of the Total Environment, 408(19):4230-4238.

See Also

ltdl.fix.df, remove.na, bxplot, gx.ecdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 
## Make test data available
data(sind)
attach(sind)

## Display
gx.plot2parts(Cu, Zn)

## Display with alternate xy-plot titling
gx.plot2parts(Cu, Zn, x1lab = "Cu (mg/kg) in stream sediment",
	x2lab = "Zn (mg/kg) in stream sediment")

## Detach test data
detach(sind)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.