ipanel.smooth {IDPmisc}R Documentation

Panelplot for itermplot

Description

An example of a useful panel function for huge datasets

Usage

ipanel.smooth(x, y = NULL, pixs = 1, zmax = NULL,
              ztransf = function(x) {x},
              colramp = IDPcolorRamp, col = "black", lwd = 2,
              span = 2/3, iter = 3, ...)

Arguments

x, y

Numeric vectors of the same length.

pixs

Size of pixel in x- and y-direction in [mm] on the plotting device. When x and y are numeric, pixels are square. When x and y are factors, pixels are no longer square. The pixels are enlarged in x-direction.

zmax

Maximum number of counts per Pixel in the plot. When NULL, the density in the scatter plot is encoded from 0 pixel to maximum number of counts observed. zmax must be equal or larger than maximum number of counts found.

ztransf

Function to transform the number of counts per pixel, which will be mapped by the function in colramp to well defined colors. The user has to make sure that the transformed density lies in the range [0,zmax], where zmax is any positive number (>=2). For examples see ipairs and ilagplot.

colramp

Color ramp to encode the number of counts within a pixel by color.

col, lwd

Color and line width of the “smoothed curve”.

span

the smoother span. This gives the proportion of points in the plot which influence the smooth at each value. Larger values give more smoothness.

iter

The number of robustifying iterations which should be performed. Using smaller values of iter will make lowess run faster.

...

Other graphical parameters as arguments to the lines function.

Author(s)

Rene Locher

See Also

lowess

Examples

r.lm <- lm(Sepal.Length~Sepal.Width+Petal.Length+Petal.Width+Species,
           data = iris)
par(mfrow = c(2,2), pty = "s")
itermplot(r.lm, se = TRUE, partial.res = TRUE, smooth = ipanel.smooth,
          lwd.smth = 3, pixs = 2, ask = FALSE)

if (require(SwissAir)) {
  par(mfrow = c(1,1))
  dat <- log(AirQual[,c("ad.O3", "ad.WS")])
  pairs(dat,
        panel = ipanel.smooth)
} else print("Package SwissAir is not available")


[Package IDPmisc version 1.1.21 Index]