mbgraphic (version 1.0.1)

sdf_quicksort: Fast reordering of a list of class "sdfdata"

Description

Reorders a list of class "sdfdata" based on hierarchical clustering in connection with optimal leaf ordering for displaying scagnostics results in scaggrams.

Usage

sdf_quicksort(sdfdata)

Arguments

sdfdata

A list of class "sdfdata" generated by function sdf or scag2sdf.

Value

A list of class "sdfdata".

Details

The reordering is based on clustering of the variables of sdfdata$data.

1-cor(sdfdata$data) is used as a similarity measure. The linkage method is average. Function seriate from package seriation is used.

References

Z. Bar-Joseph, E. D. Demaine, D. K. Gifford, and T. Jaakkola (2001) Fast Optimal Leaf Ordering for Hierarchical Clustering Bioinformatics 17(1) 22--29.

M. Hahsler, K. Hornik und C. Buchta (2008) Getting Things in Order: An Introduction to the R Package seriation Journal of Statistical Software 25(3) 1--34.

See Also

sdf, scag2sdf, sdf_sort, scaggram, iascaggram,

seriate in package seriation

Examples

Run this code
# NOT RUN {
data(Election2005)
# consider only demographic/economic information
election05_ds <- Election2005[,1:40]
# }
# NOT RUN {
scagdf <- sdf(election05_ds)
# new order 
scagdf_o <- sdf_quicksort(scagdf)
# compare scaggrams
par(mfrow=c(1,2))
scaggram(scagdf,select=(c(1,5,9)))
scaggram(scagdf_o,select=(c(1,5,9)))
# }

Run the code above in your browser using DataCamp Workspace