inset.exporter {rgr}R Documentation

Saves an EDA Graphical and Statistical Summary

Description

Saves the output from inset as a graphics file in the R working directory for use in report or map preparation.

Usage

inset.exporter(x, xlab = deparse(substitute(x)), log = FALSE, xlim = NULL, 
        nclass = NULL, ifnright = TRUE, file = NULL, gtype = "wmf", ...)

Arguments

x name of the variable to be plotted.
xlab a label for the x-axis. It is often desirable to replace the default x-axis label of the input variable name text string with a more informative label, e.g., xlab = "Cu (mg/kg) in <2 mm O-horizon soil".
log if it is required to display the data with logarithmic (x-axis) scaling, set log = TRUE.
xlim default limits of the x-axis are determined in the function. However when used stand-alone the limits may be user-defined by setting xlim, see Note below.
nclass the default procedure for preparing the histogram is to use the Scott (1979) rule. This usually provides an informative histogram, other optional rules are nclass = "sturges" or nclass = "fd"; the later standing for Freedman-Diaconis (1981), a rule that is resistant to the presence of outliers in the data.
ifnright controls where the sample size is plotted in the histogram display, by default this in the upper right corner of the plot. If the data distribution is such that the upper left corner would be preferable, set ifnright = FALSE.
file the first part of the file name identifying the data source for saving the function output in the R working directory, see Details below.
gtype the format of the graphics file to be saved. By default gtype = "wmf" for a Windows metafile. Other alternatives are gtype = "jpg" for a jpeg file, gtype = "png" for a portable graphics file, gtype = "ps" for a postscript file, or gtype = "pdf" for a pdf file.
... further arguments to be passed to methods. For example, by default individual data points in the ECDF and CPP plots are marked by a plus sign, pch = 3, if a cross or open circle is desired, then set pch = 4 or pch = 1, respectively. See display.marks for all available symbols. Adding ifqs = TRUE results in horizontal and vertical dotted lines being plotted at the three central quartiles and their values, respectively, in the CPP plot.

Details

See inset for details concerning the inset parameters.

file contains the first part of the file name identifying the data source for the output file to be saved in the R working directory, see Note below. The function concatenates the working directory name with file, _, x as a character string, and _inset. Subsequently the suffix gtype is appended and the file saved in the R working directory.

Note

To set the R working directory, use at the R command line, for example, setwd("C:\\R\\WDn") which will result in all saved output being placed in that folder.

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

Any NAs in the data vector are removed prior to displaying and saving the plot.

If the default selection for xlim is inappropriate it can be set, e.g., xlim = c(0, 200) or c(2, 200). If the defined limits lie within the observed data range a truncated plot will be displayed. If this occurs the number of data points omitted is displayed below the total number of observations.

In some instances if the graphics window has been resized the last line(s) of the table may not be displayed. Resizing the window to be smaller will display the whole table. If the whole table is not visible it will not be saved properly to the graphics file in inset.exporter. Once as a complete graphics file the image may be resized in the receiving document.

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 that loads the rgr package, etc.

Author(s)

Robert G. Garrett

See Also

inset, ltdl.fix.df


[Package rgr version 1.0.3 Index]