| 27442 |
ripley |
1 |
\name{plot.data.frame}
|
|
|
2 |
\alias{plot.data.frame}
|
|
|
3 |
\title{Plot Method for Data Frames}
|
|
|
4 |
\description{
|
| 32214 |
ripley |
5 |
\code{plot.data.frame}, a method for the \code{\link{plot}} generic.
|
|
|
6 |
It is designed for a quick look at numeric data frames.
|
| 27442 |
ripley |
7 |
}
|
|
|
8 |
\usage{
|
|
|
9 |
\method{plot}{data.frame}(x, \dots)
|
|
|
10 |
}
|
|
|
11 |
\arguments{
|
|
|
12 |
\item{x}{object of class \code{data.frame}.}
|
|
|
13 |
\item{\dots}{further arguments to \code{\link{stripchart}},
|
|
|
14 |
\code{\link{plot.default}} or \code{\link{pairs}}.}
|
|
|
15 |
}
|
| 32212 |
ripley |
16 |
\details{
|
| 32214 |
ripley |
17 |
This is intended for data frames with \emph{numeric} columns. For more
|
|
|
18 |
than two columns it first calls \code{\link{data.matrix}} to convert
|
|
|
19 |
the data frame to a numeric matrix and then calls \code{\link{pairs}}
|
|
|
20 |
to produce a scatterplot matrix). This can fail and may well be
|
|
|
21 |
inappropriate: for example numerical conversion of dates will lose
|
|
|
22 |
their special meaning and a warning will be given.
|
|
|
23 |
|
|
|
24 |
For a two-column data frame it plots the second column against the
|
|
|
25 |
first by the most appropriate method for the first column.
|
|
|
26 |
|
|
|
27 |
For a single numeric column it uses \code{\link{stripchart}}, and for
|
|
|
28 |
other single-column data frames tries to find a plot method for the
|
|
|
29 |
single column.
|
| 32212 |
ripley |
30 |
}
|
| 27442 |
ripley |
31 |
\seealso{
|
|
|
32 |
\code{\link{data.frame}}
|
|
|
33 |
}
|
|
|
34 |
\examples{
|
|
|
35 |
plot(OrchardSprays[1], method="jitter")
|
|
|
36 |
plot(OrchardSprays[c(4,1)])
|
|
|
37 |
plot(OrchardSprays)
|
| 32214 |
ripley |
38 |
|
|
|
39 |
plot(iris)
|
|
|
40 |
plot(iris[5:4])
|
|
|
41 |
plot(women)
|
| 27442 |
ripley |
42 |
}
|
|
|
43 |
\keyword{hplot}
|
|
|
44 |
\keyword{methods}
|