File: prepanel.functions.Rd

package info (click to toggle)
lattice 0.20-41-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,988 kB
  • sloc: ansic: 357; makefile: 2
file content (88 lines) | stat: -rw-r--r-- 3,048 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
\name{F_3_prepanel.functions}
\alias{prepanel.lmline}
\alias{prepanel.loess}
\alias{prepanel.spline}
\alias{prepanel.qqmathline}
\title{ Useful Prepanel Function for Lattice}
\description{
  These are predefined prepanel functions available in Lattice.
}

\usage{
prepanel.lmline(x, y, \dots)
prepanel.qqmathline(x, y = x, distribution = qnorm,
                    probs = c(0.25, 0.75), qtype = 7,
                    groups, subscripts,
                    \dots) 
prepanel.loess(x, y, span, degree, family, evaluation,
               horizontal = FALSE, \dots)
prepanel.spline(x, y, npoints = 101, 
                horizontal = FALSE, \dots,
                keep.data = FALSE)

}
\arguments{
  \item{x, y}{x and y values, numeric or factor}
  \item{distribution}{ quantile function for theoretical
    distribution. This is automatically passed in when this is used as a
    prepanel function in \code{qqmath}.
  }
  \item{qtype}{ type of \code{\link{quantile}}}
  \item{probs}{
    numeric vector of length two, representing probabilities.  If used
    with \code{aspect="xy"}, the aspect ratio will be chosen to make the
    line passing through the corresponding quantile pairs as close to 45
    degrees as possible.
  }
  \item{span, degree, family, evaluation}{ Arguments controlling the
    underlying \code{\link{loess}} smooth. }

  \item{horizontal, npoints}{ See documentation for corresponding panel
    function.
  }

  \item{keep.data}{ Ignored. Present to capture argument of the same
    name in \code{\link{smooth.spline}}. }
  
  \item{groups, subscripts}{ See \code{\link{xyplot}}.  Whenever
    appropriate, calculations are done separately for each group and
    then combined.  }

  \item{\dots}{ Other arguments.  These are passed on to other functions
    if appropriate (in particular, \code{\link{smooth.spline}}), and
    ignored otherwise. }

}

\details{

  All these prepanel functions compute the limits to be large enough to
  contain all points as well as the relevant smooth.

  In addition, \code{prepanel.lmline} computes the \code{dx} and
  \code{dy} such that it reflects the slope of the linear regression
  line; for \code{prepanel.qqmathline}, this is the slope of the line
  passing through the quantile pairs specified by \code{probs}.  For
  \code{prepanel.loess} and \code{prepanel.spline}, \code{dx} and
  \code{dy} reflect the piecewise slopes of the nonlinear smooth.

}

\value{
  usually a list with components \code{xlim}, \code{ylim}, \code{dx} and
  \code{dy}, the first two being used to calculate panel axes limits,
  the last two for banking computations.  The form of these components
  are described under \code{\link{xyplot}}.  There are also several
  prepanel functions that serve as the default for high level functions,
  see \code{\link{prepanel.default.xyplot}}
}

\seealso{

  \link{Lattice}, \code{\link{xyplot}}, \code{\link{banking}},
  \code{\link{panel.loess}}, \code{\link{panel.spline}}.

}
\author{ Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}}
\keyword{dplot}