corrPlot {imageData}R Documentation

Calculates and plots correlation matrices for a set of responses

Description

Having calculated the correlations a heat map indicating the magnitude of the correlations is produced using ggplot. In this heat map, the darker the red in a cell then the closer the correlation is to -1, while the deeper the blue in the cell, then the closer the correlation is to 1. Also produced is a matrix plot of all pairwise combinations of the variables. The matrix plot contains a scatter diagram for each pair, as well as the value of the correlation coefficient. The argument pairs.sets can be used to restrict the pairs in the matrix plot to those combinations within each set.

Usage

corrPlot(responses, data, which.plots = c("heatmap","matrixplot"), 
                       title = NULL, labels = NULL, labelSize = 4, 
                       show.sig = FALSE, pairs.sets = NULL, ...)

Arguments

responses

A character giving the names of the columns in data containing the variables to be correlated.

data

A data.frame containing the columns of variables to be correlated.

which.plots

A character specifying the plots of the correlations to be produced.

title

Title for the plots.

labels

A character specifying the labels to be used in the plots. If labels is NULL, responses is used for the labels.

labelSize

A numeric giving the size of the labels in the matrixplot.

show.sig

A logical indicating whether or not to give asterisks indicating significance on the plot.

pairs.sets

A list each of whose components is a numeric giving the position of the variable names in responses that are to be included in the set. All pairs of variables in this pairs.set will be included in a matrix plot.

...

allows passing of arguments to other functions

Value

NULL.

Author(s)

Chris Brien

See Also

ggplot.

Examples

## Not run: 
data(exampleData)
responses <- c("Area","Area.SV","Area.TV", "Image.Biomass", "Max.Height","Centre.Mass",
               "Density", "Compactness.TV", "Compactness.SV")
corrPlot(responses, longi.dat, pairs.sets=list(c(1:4),c(5:7)))


## End(Not run)

[Package imageData version 0.1-62 Index]