Description Usage Arguments Details Value See Also Examples
Run charts for multivariate data in trellis (grid) layout.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
Formula object to plot. The formula is of the form y ~ x | g1 + g2 + ..., indicating that plots of y (on the y-axis) versus x (on the x-axis) should be produced conditional on the variables g1, g2. |
chart |
Type of chart: 'run' or 'i'. |
xscale |
Scaling of x-axes: 'same' or 'free'. |
yscale |
Scaling of y-axes: 'same' or 'free'. |
dec |
Number of decimals of median value. The default behaviour (smart rounding to at least two significant digits) should be satisfactory in most cases. |
xpad |
Number specifying the fraction by which to extend the x-axis in order to make space for the median label. |
pch |
Plotting character. |
cex |
Number indicating the magnification of plotting character. |
gap |
Number indicating spacing between panels. |
target |
Value specifying a target line to plot. |
... |
Further arguments to xyplot. |
This function is a wrapper for xyplot
from the
lattice
package. Some usefull arguments from
xyplot
are main
, ylab
, xlab
, and
layout
.
Returns an object of class "trellis".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Trellis run chart on 1 conditioning variable
d1 <- data.frame(y = rnorm(96, 12, 3),
expand.grid(x = 1:24,
g = LETTERS[1:4]))
trc(y ~ x | g, data = d1, main = 'Trellis run chart')
# Add target line
trc(y ~ x | g, data = d1, main = 'Trellis run chart', target = 20)
# Trellis run chart on 2 conditioning variables
d2 <- data.frame(y = rnorm(144, 12, 3),
expand.grid(x = seq.Date(as.Date('2014-1-1'),
by = 'week',
length.out = 24),
g1 = LETTERS[1:3],
g2 = letters[1:2]))
trc(y ~ x | g1 + g2, data = d2, main = 'Trellis run chart')
# Introduce a shift in process performance
d2$y[132:144] <- d2$y[132:144] * 3
trc(y ~ x | g1 + g2, data = d2, main = 'Trellis run chart')
# Make I chart
trc(y ~ x | g1 + g2, data = d2, main = 'Trellis run chart', chart = 'i')
|
qicharts will no longer be maintained. Please consider moving to qicharts2: https://anhoej.github.io/qicharts2/.
Warning message:
trc() will be deprecated. Use tcc() instead.
Warning message:
trc() will be deprecated. Use tcc() instead.
Warning message:
trc() will be deprecated. Use tcc() instead.
Warning message:
trc() will be deprecated. Use tcc() instead.
Warning message:
trc() will be deprecated. Use tcc() instead.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.