Learn R Programming

rapport (version 0.31)

rp.cor.plot: Scatterplot matrices

Description

This function is a wrapper around pairs which operates only on numeric variables. Panel options are: c('panel.cor', 'panel.smooth', 'panel.hist'). Custom panels may be also added.

Usage

rp.cor.plot(x, lower.panel = "panel.smooth",
    upper.panel = "panel.cor", data = NULL, ...)

Arguments

x
numeric variables
lower.panel
see: pairs parameter. Default set to 'panel.smooth'.
upper.panel
see: pairs parameter. Default set to 'panel.cor'.
data
an optional data frame from which the variables should be taken
...
additional parameters to pairs

Examples

Run this code
## setting rp.names first
df <- mtcars
for (i in 1:ncol(df))
  attr(df[, i], "name") <- names(df)[i]
rp.cor.plot(df)
rp.cor.plot(df, diag.panel = 'panel.hist')

Run the code above in your browser using DataLab