\HeaderA{qq}{Quantile-Quantile Plots of Two Samples}{qq}
\keyword{dplot}{qq}
\begin{Description}\relax
Quantile-Quantile plots for comparing two Distributions
\end{Description}
\begin{Usage}
\begin{verbatim}
qq(formula, f.value = NULL, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{formula}] formula of the form \code{y \textasciitilde{} x | g1 * g2 * ...},
where \code{x} must be a numeric, and \code{y} can be a factor,
shingle, character or numeric vector, with the restriction that there
must be exactly two levels of \code{y}, which divide the values of
\code{x} into two groups. Quantiles for these groups will be plotted
along the two axes.

\item[\code{f.value}] optional function of a single integer (representing
the larger of the two sample sizes), returning a vector of
probabilities corresponding to which quantiles should be
plotted. The typical value for this argument is \code{ppoints},
which is also the S-PLUS default. If specified, the probabilities
generated by this function is used for the plotted quantiles, using
the \code{quantile} function.

\code{f.value} defaults to \code{NULL}, which is equivalent to
using \code{function(n) ppoints(n, a = 1)}. This has the effect of
including the minimum and maximum data values in the computed
quantiles. This is similar to what happens for \code{qqplot} but
different from the default \code{qq} behaviour in S-PLUS.

\item[\code{...}] Other arguments
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{qq} produces a Q-Q plot of two samples.  The default behaviour
of \code{qq} is different from the corresponding S-PLUS function. See
the entry for \code{f.value} for specifics.

This and all other high level Trellis functions have several
arguments in common. These are extensively documented only in the
help page for \code{xyplot}, which should be consulted to learn more
detailed usage.
\end{Details}
\begin{Value}
An object of class ``trellis''. The `update' method can be used to
update components of the object and the `print' method (usually called
by default) will plot it on an appropriate plotting device.
\end{Value}
\begin{Author}\relax
Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{xyplot}{xyplot}}, \code{\LinkA{panel.qq}{panel.qq}},
\code{\LinkA{qqmath}{qqmath}}, \code{\LinkA{Lattice}{Lattice}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
qq(voice.part ~ height, aspect = 1, data = singer,
   subset = (voice.part == "Bass 2" | voice.part == "Tenor 1"))
\end{ExampleCode}
\end{Examples}

