shipunov (version 1.5)

Pleiad: Correlation circles (correlation pleiads)

Description

Correlation circles (correlation pleiads)

Usage

Pleiad(tbl, abs=FALSE, corr=FALSE, dist=FALSE, treshold=FALSE,
 circ=list(1, 1, 1), breaks=5, auto=TRUE, gr=6, lwd=NULL, lty=NULL, lcol=NULL,
 abbr=-1, lbltext="internal", lblcex=1, off=1.09, hofft=0.07, hoff=1.02, legend=TRUE,
 legtext=1, legpos="topright", leghoriz=FALSE, show.int=FALSE, dig.lab=1, ...)

Arguments

tbl

Data: square matrix

abs

If TRUE, uses absolute values instead of real

corr

If TRUE, uses absolute values instead of real and cuts from 0 to 1, this is good for correlation matrices

dist

If TRUE, converts distance matrix to the data frame -- good for "dist" objects

treshold

If this is (saying) =.5, selects for plotting (with lty=1) only those values which are >.5

circ

Line type, width and color for the cirle; if first or third =0, no cicrle

breaks

How to cut() values, if "cramer", then =c(0, .1, .3, .5, 1)

auto

If FALSE, specify 'lwd', 'lty' and 'lcol'

gr

Grayscale scheme starts from 6 breaks

lwd

If autolines=FALSE, change to vector concerted with breaks

lty

If autolines=FALSE, change to vector concerted with breaks

lcol

If autolines=FALSE, change to vector concerted with breaks; if length(lcol) == 1, all lines are of particular color

abbr

If =-1, no abbreviation; if =0, no labels; other values run abbreviate(..., abbr)

lbltext

If this is a vector starting from something else, will replace dimnames

lblcex

Magnification of labels

off

Radial offset of labels, be careful!

hofft

Treshold determining which labels are rigtmost/leftmost, 'hofft=0' put all labels into this group

hoff

Horizontal offset for rightmost/leftmost labels; 'hoff=1' removes offset

legend

If FALSE, no legend

legtext

If =1 then "weaker ... stronger"; if =2, shows cutting intervals; if =3, then 1:5; if >3, issues error

legpos

This is from 'legend()'

leghoriz

Equal to 'horiz=' from 'legend()'

show.int

Show intervals in (...] form

dig.lab

dig.lab for 'cut()'

...

Arguments to 'points()'

Value

Data frame with position of points, helps in subsequent plot enhancing

Details

Correlation circles (correlation pleiads). Based on the works of Petr Terentjev's (Saint Petersburg) school. Alternatives: those graph plotting packages which are able to plot "correlogram". It is probably a good idea to order data entries with hierarchical clustering results to optimize resulted graph. The plot has no margins so consider second 'legend()' to add any text to the plot (see examples).

Examples

Run this code
# NOT RUN {
l.c <- cor(datasets::longley, method="spearman", use="pairwise")
Pleiad(l.c, corr=TRUE, legtext=2, pch=21, cex=2, bg="white",
 breaks=3, gr=3, hoff=1, show.int=TRUE)
legend("topleft", legend="Title", text.font=2, bty="n")

dr.c <- cor(drosera[, -1], method="spearman", use="pairwise")
Pleiad(dr.c, corr=TRUE, legtext=2, pch=19, cex=1.2)
# }

Run the code above in your browser using DataLab