Learn R Programming

mbgraphic (version 1.0.1)

scaggram: Visualization of scagnostics results in matrix graphics

Description

Scaggram are thought as a generalization of corrgrams. It is possible to use up to three arbitrary scagnostics at the same time. Each of the measures is represented by one of the colors red, green, or blue. The resulting color of a cell (representing a pair of variables) in the scaggram is given by the mixture of the (up to) three colors according to the values of the scagnostics.

Usage

scaggram(sdfdata,select=1,add=FALSE,label=FALSE,order= FALSE)

Arguments

sdfdata

A list of class "sdfdata".

select

Numeric or character vector of length 1, 2 or 3. Give the column numbers of the measures or their names. Default is 1.

add

Logical. Which additional features should be added to the plot? FALSE for none, "splom" for scatterplots and "glyphs" for star glyphs of all scagnostics stored in sdfdata$sdf.

label

Should the names of the variables be plotted? Default is FALSE.

order

Should the variables be reordered? Default is FALSE. Use 2 or "quicksort" for quick reorering with function sdf_quicksort, 3 or "All scagnostics" for reordering with function sdf_sort based on all scagnosticsand 4 or "Selected scagnostics" for reordering with sdf_sort based on the selected scagnostics.

Details

Given three scagnostics with values s1, s2, s3 describing a pair of variables, then the color of the respective cell of the scaggram is determined by rgb(s1,s2,s3, alpha = max(s1,s2,s3)).

If glyphs or a splom are added by setting add, the part above the diagonal is used for the additional feature and the color of the cells is drawn with a transparency of max(s1,s2,s3,0.2)).

See Also

iascaggram, sdf, scag2sdf, sdf_sort, sdf_quicksort

rgb

Examples

Run this code
# NOT RUN {
data(Election2005)
# Results of the election
# }
# NOT RUN {
sdfres <- sdf(Election2005[,41:70])
# Use scagnostics "Outlying", "Clumpy" and "Monotonic"
scaggram(sdfres,select=c(1,3,9))
# }

Run the code above in your browser using DataLab