The R Project SVN R

Rev

Rev 32212 | Rev 56184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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