plot(x, y, main, xlab, ylab, xlim, ylim, axes)
input <- mtcars[,c('wt','mpg')] print(head(input))
wt mpg Mazda RX4 2.620 21.0 Mazda RX4 Wag 2.875 21.0 Datsun 710 2.320 22.8 Hornet 4 Drive 3.215 21.4 Hornet Sportabout 3.440 18.7 Valiant 3.460 18.1
# Get the input values. input <- mtcars[,c('wt','mpg')]
pairs(formula, data)
# Give the chart file a name. png(file = "scatterplot_matrices.png") # Plot the matrices between 4 variables giving 12 plots.