Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

panelCorr

Scatterplot Panel


Description

This function produces a bivariate scatterplot with the Pearson correlation. This is for use with the function panelplot.

Usage

panelCorr(data, ...)

Arguments

data

A data frame with columns x and y

...

Additional arguments

Author(s)

J.H. Maindonald

Examples

# correlation between body and brain weights for 20 mice:

weights <- litters[,-1]
names(weights) <-  c("x","y")
weights <- list(weights)
weights[[1]]$xlim <- range(litters[,2])
weights[[1]]$ylim <- range(litters[,3])
panelplot(weights, panelCorr, totrows=1, totcols=1)

DAAG

Data Analysis and Graphics Data and Functions

v1.24
GPL-3
Authors
John H. Maindonald and W. John Braun
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.