Description Usage Arguments Details Note Author(s) References See Also Examples

Displays a concentration-area (C-A) plot to assess whether the data are spatially multi-fractal (Cheng et al., 1994; Cheng and Agterberg, 1995) as a part of a four panel display. This procedure is useful for determining if multiple populations that are spatially dependent are present in a data set. It can be used to determine the practical limits, upper or lower bounds, of the influence of the biogeochemical processes behind the spatial distribution of the data. Optionally the data may be logarithmically transformed (base 10) prior to interpolation, the points may be ‘jittered’ (see Arguments below), the size of the interpolated grid may be modified, and alternate colour schemes can be chosen for display of the interpolated data.

1 2 3 | ```
caplot(x, y, z, zname = deparse(substitute(z)), caname = NULL,
log = TRUE, ifjit = FALSE, ifrev = FALSE, ngrid = 100,
colr = topo.colors(16), xcoord = "Easting", ycoord = "Northing")
``` |

`x` |
name of the x-axis spatial coordinate, the eastings. |

`y` |
name of the y-axis spatial coordinate, the northings. |

`z` |
name of the variable to be processed and plotted. |

`zname` |
by default the character string for |

`caname` |
a title for the image of the interpolated data, by default the character string for |

`log` |
the default is set to |

`ifjit` |
if there is a possibility that the data set contains multiple measurements at an identical spatial (x,y) location set |

`ifrev` |
by default the empirical C-A function is plotted from highest value to lowest, |

`ngrid` |
by default |

`colr` |
by default the |

`xcoord` |
a title for the x-axis, defaults to |

`ycoord` |
a title for the y-axis, defaults to |

The function creates a four panel display. The percentage cumulative probabity (CPP) plot of the data in the upper left, and the CPP plot of the interpolated data to be used in the C-A plot in the upper right. The lower left panel contains an image of the interpolated data, and the lower right the C-A plot.

Akima's (1978, 1996) interpolation function is used to obtain a linear interpolation between the spatial data values. If the data are from a ‘closed’ composition or are positively skewed the use of a logarithmic data transformation, `log = TRUE`

, is highly recommended, as noted above this is commonly the case and is the default. Following generation of the interpolated grid and prior to futher processing the interpolated grid values are clipped by the convex-hull of the spatial locations, therefore there is no interpolation beyond the spatial extent, support, of the data is displayed.

The use of the `topo.colors(16)`

palette to display the image of the interpolated values leads to low values being plotted in blue, and as the interpolated values increase they take on green, yellow and orange colors. For a grey-scale display for black-and-white use set `colr = grey(0:8/8)`

. This leads to lowest interpolated values being plotted in black and the highest in white, using `colr = grey(8:0/8)`

reverses this, with the lowest values being plotted in white and the highest in black. In either case, if the values plotted in white occur at the study area boundary, i.e. at the convex hull, the difference between no data and white cannot be discerned.

For preparation of the C-A plot the ordered vector of interpolated values is used as a surrogate for the measurement of area greater than, or less than, a stated interpolated value. The cumulative percentage count of the interpolated values being plotted on the y-axis of the C-A plot. As noted above, it is both informative and important to display the C-A plot accumulated both upwards and downwards.

This wrapper function was developed from a S-Plus function to prepare C-A plots using Akima's (1978, 1996) interpolation procedure written by Graeme Bonham-Carter, Geological Survey of Canada, in April 2004.

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 sites with `NA`

s in their (x,y,z) data are removed prior to spatial interpolation and preparation of the C-A plot.

In some R installations the generation of multi-panel displays and the use of function eqscplot from package MASS causes warning messages related to graphics parameters to be displayed on the current device. These may be suppressed by entering `options(warn = -1)`

on the R command line, or that line may be included in a `first`

function prepared by the user for loading the ‘rgr’ package, etc.

Graham F. Bonham-Carter and Robert G. Garrett

Akima, H. (1978). A Method of Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points. ACM Transactions on Mathematical Software, 4(2):148-164.

Akima, H. (1996). Algorithm 761: scattered-data surface fitting that has the accuracy of a cubic polynomial. ACM Transactions on Mathematical Software, 22(3):362-371.

Cheng, Q. and Agterberg, F.P., 1995. Multifractal modeling and spatial point processes. Mathematical Geology, 27(7):831-845.

Cheng, Q., Agterberg, F.P. and Ballantyne, S.B., 1994. The separation of geochemical anomalies from background by fractal methods. Journal of Geochemical Exploration, 51(2):109-130.

`cnpplt`

, `interp`

, `gx.mf`

, `shape.alt`

, `colors`

, `ltdl.fix.df`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
## The following examples are commented out as package akima is not
## automatically made available as it is only a suggest, not a depends,
## and therefore caplot fails when the examples are run during package
## checking and building. Functions shape.alt and/or gx.mf also be used
## to study mulifractality, and these have no restrictions
## Make test data available
## data(kola.o)
## attach(kola.o)
## A default (uninformative) C-A plot
## caplot(UTME/1000, UTMN/1000, Cu)
## Plot a more appropriately scaled (log transformed data) and
## titled display
## caplot(UTME/1000, UTMN/1000, Cu, log = TRUE,
## zname = "Cu (mg/kg) in\n<2 mm O-horizon soil",
## caname = "Kola Project, 1995\nCu (mg/kg) in <2 mm O-horizon soil")
## Plot as above but with the C-A plot accumulation reversed
## caplot(UTME/1000, UTMN/1000, Cu, log = TRUE, ifrev = TRUE,
## zname = "Cu (mg/kg) in\n<2 mm O-horizon soil",
## caname = "Kola Project, 1995\nCu (mg/kg) in <2 mm O-horizon soil")
## Detach test data
## detach(kola.o)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.