ICLUST.rgraph {psych} | R Documentation

## Draw an ICLUST graph using the Rgraphviz package

### Description

Given a cluster structure determined by `ICLUST`, create a rgraphic directly using Rgraphviz. To create dot code to describe the `ICLUST` output with more precision, use `ICLUST.graph`. As an option, dot code is also generated and saved in a file. To use the dot code, use either http://www.graphviz.org/ Graphviz or a commercial viewer (e.g., OmniGraffle).

### Usage

    ICLUST.rgraph(ic.results, out.file = NULL, min.size = 1, short = FALSE,
        labels = NULL, size = c(8, 6), node.font = c("Helvetica", 14),
       edge.font = c("Helvetica", 10), rank.direction=c("RL","TB","LR","BT"),
        digits = 2, title = "ICLUST",label.font=2, ...)

### Arguments

`ic.results` | output list from ICLUST
`out.file` | File name to save optional dot code.
`min.size` | draw a smaller node (without all the information) for clusters < min.size – useful for large problems
`short` | if short==TRUE, don't use variable names
`labels` | vector of text labels (contents) for the variables
`size` | size of output
`node.font` | Font to use for nodes in the graph
`edge.font` | Font to use for the labels of the arrows (edges)
`rank.direction` | LR or TB or RL
`digits` | number of digits to show
`title` | any title
`label.font` | The variable labels can be a different size than the other nodes. This is particularly helpful if the number of variables is large or the labels are long.
`...` | other options to pass

### Details

Will create (or overwrite) an output file and print out the dot code to show a cluster structure. This dot file may be imported directly into a dot viewer (e.g., http://www.graphviz.org/). The "dot" language is a powerful graphic description language that is particulary appropriate for viewing cluster output. Commercial graphics programs (e.g., OmniGraffle) can also read (and clean up) dot files.

ICLUST.rgraph takes the output from `ICLUST` results and processes it to provide a pretty picture of the results. Original variables shown as rectangles and ordered on the left hand side (if rank direction is RL) of the graph. Clusters are drawn as ellipses and include the alpha, beta, and size of the cluster. Edges show the cluster intercorrelations.

It is possible to trim the output to not show all cluster information. Clusters < min.size are shown as small ovals without alpha, beta, and size information.

### Value

Output is a set of dot commands written either to console or to the output file. These commands may then be used as input to any "dot" viewer, e.g., Graphviz.

ICLUST.rgraph is a version of `ICLUST.graph` that uses Rgraphviz to draw on the screen as well.

Additional output is drawn to main graphics screen.

### Note

Requires Rgraphviz

### Author(s)

revelle@northwestern.edu
http://personality-project.org/revelle.html

### References

ICLUST: http://personality-project.org/r/r.ICLUST.html

### See Also

`VSS.plot`, `ICLUST`

### Examples

    test.data <- Harman74.cor$cov
    ic.out <- ICLUST(test.data)   #uses iclust.diagram instead

[Package psych version 1.6.9 Index]