Description Usage Arguments Details Value Note Author(s) See Also
View source: R/prepanel.trim.R
Trims numeric x and or y limits to specified quantiles. May be useful when unusual extreme values distort the scales and obscure informative features of the data. Scales for factors are not affected.
1  prepanel.trim(x, y, trim.x = 0, trim.y = 0.05, min.trim = 20, ...)

x, y 
x and y values, numeric or factor. 
trim.x, trim.y 
Numeric trimming proportions, p, with 0 <= p < .5 . 
min.trim 
The minimum number of data values needed before trimming after removing NAs and Infs. Otherwise the range of the data is returned (min and max of all the remaining finite values). 
... 
Other arguments, usually ignored 
If the trimming proportion is p, the limits returned are essentially
quantile(p, 1p, type = 8)
. See quantile
for details.
So, for example if p = .1, roughly 10% of the lowest and 10% of the highest values are removed, and the range of the middle 80% of the data are returned. More precisely (quoting from xyplot
), “... the actual limits of the panels are guaranteed to include the limits returned by the prepanel function” – i.e., these quantiles.
For numeric data, a numeric vector of length 2, as would be returned by
range
. For a factor, a list with components yat
and ylim
,
as described in the prepanel
section of xyplot
No banking calculations are done.
Bert Gunter bgunter.4567@gmail.com
xyplot
, prepanel.default.xyplot
,
quantile
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.