fences.summary(group, x, file = NULL, units = "ppm")
gx.stats
. Fences are computed following Tukey's boxplot procedure, as median +/- 2 * MAD (Median Absolute Deviation), and mean +/- 2 * SD (Standard Deviation), see Reimann et al. (2005). It is essential that these estimates are viewed in the context of the graphical distributional displays, e.g., shape
and its graphical components, gx.hist
, gx.ecdf
, cnpplt
and bxplot
, and if spatial coordinates for the sample sites are available map.eda7
, map.eda8
and caplot
. The final selection of a range for background or the selection of a threshold level needs to take the statistical and spatial distributions of the data into account. It is also necessary to be aware that it might be appropriate to have more than one background range/threshold in an area (Reimann and Garrett, 2005). The presence of relevant information in the data frame may permit the data to be subset on the basis of that information for display with the tbplots
, bwplots
and gx.cnpplts
functions. If these indicate that the medians and middle 50%s of the data are visibly different, multiple background ranges may be advisable.
A default file name is generated from the data frame, group and variable (x) names,
data frame name_deparse(substitute(group))_deparse(substitute(x))_fences.txt
. If file
contains text it is used as the first part of the file name identifying the data source for the file to be saved in the specified folder, for example, file = "D://R_work//Project3//C_soils"
. If no folder is specified the file is saved in the R working directory.
Output to the current device is suppressed. The output file is formatted as a tab delimited file to be read with a spread sheet program. It can be inspected with a text viewer, and column spacings edited for cosmetic purposes with an ASCII editor of the user's choice.fences
, ltdl.fix.df
, remove.na
## Make test data available
data(kola.c)
attach(kola.c)
## Saves the file kola_c_COUNTRY_Cu_fences.txt for later use
## in the R working directory.
fences.summary(COUNTRY, Cu, file = "Kola_c_horizon")
## Detach test data
detach(kola.c)
Run the code above in your browser using DataLab