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

Function to plot the results of Control Reference Material (CRM) analyses in the order in which they occur in a file, assuming that this order is a time-series, so that the presence of ‘drift’ may be recognized, in addition to the presence of gross outliers reflecting ‘analytical problems’. The data are plotted as either values, when the associated standard deviation of the CRM is provided, or percent absolute relative difference from the ‘recommended’ value when a target tolerance level is provided (see below). The expected ‘recommended’ value (long-term mean) for the CRM being displayed must be supplied, together with its associated standard deviation, or a target tolerance level for percent absolute relative difference. By default the CRM recommended value and standard deviation are used to plot red dashed lines at the recommended value +/- 2 standard deviations, and a green line for the recommended value, alternate standard deviation multiples may be provided. This display is also known as a Shewart plot.

1 2 |

`xx` |
a column vector of determinations from a data frame or matrix for a measured parameter on a CRM. |

`xname` |
a title can be displayed with the plot and results, e.g., |

`crm.mean` |
the recommended value for the CRM. A value must be provided, otherwise the function will terminate. |

`crm.sd` |
the standard deviation associated with the recommended value for the CRM. Appropriate red dotted control lines are plotted above and below the mean. |

`n.sd` |
by default 2 standard deviation limits are used on the Shewart plot, alternate values may be supplied. |

`crm.tol` |
optionally a percentage tolerance level my be provided for the maximum acceptable absolute relative percent difference from the CRM recommended value, in which case a red dotted control line is added to the plot. |

`...` |
any additional arguments to be passed to the |

Either a standard deviation for the CRM analyses or an upper limit tolerance level must be provided, otherwise the function will fail. If both are provided an percentage absolute relative difference plot is displayed.

Where the input data file contains determinations for more than one CRM, either a subset for the CRM of interest must be created, e.g., with `gx.subset`

, or the R construct `Cu[CRM=="X"]`

must be used to pass the data to the function.

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`

.

Robert G. Garrett

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
## Make test data available
data(crm.test)
attach(crm.test)
## Plot CRM analyses time-series for CRM-X using the CRM SD estimate
## and the default 2 SD tolerance bounds
crm.plot(Cu[CRM=="X"], "Cu(mgkg) in CRM-X", crm.mean = 34.5, crm.sd = 2.19)
## Plot CRM analyses time-series for CRM-X using the CRM SD estimate
## and 2.5 SD tolerance bounds
crm.plot(Cu[CRM=="X"], "Cu(mg/kg) in CRM-X", crm.mean = 34.5, crm.sd = 2.19,
n.sd = 2.5)
## Plot CRM analyses time-series for CRM-X using a maximum acceptable
## percantage tolerance bound
crm.plot(Cu[CRM=="X"], "Cu(mg/kg) in CRM-X", crm.mean = 34.5, crm.tol = 15)
## Detach test data
detach(crm.test)
``` |

rgr documentation built on March 18, 2018, 1:59 p.m.

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.