Plot Method for Data Frames, a method for the plot generic. It is designed for a quick look at numeric data frames.

methods, hplot
# S3 method for data.frame
plot(x, …)

object of class data.frame.

further arguments to stripchart, plot.default or pairs.


This is intended for data frames with numeric columns. For more than two columns it first calls data.matrix to convert the data frame to a numeric matrix and then calls pairs to produce a scatterplot matrix. This can fail and may well be inappropriate: for example numerical conversion of dates will lose their special meaning and a warning will be given.

For a two-column data frame it plots the second column against the first by the most appropriate method for the first column.

For a single numeric column it uses stripchart, and for other single-column data frames tries to find a plot method for the single column.

See Also


library(graphics) # NOT RUN { plot(OrchardSprays[1], method = "jitter") plot(OrchardSprays[c(4,1)]) plot(OrchardSprays) plot(iris) plot(iris[5:4]) plot(women) # }
Documentation reproduced from package graphics, version 3.6.2, License: Part of R 3.6.2

Community examples

Looks like there are no examples yet.