simprof.plot: Similarity Profile Analysis Dendrogram Plotter

Description Usage Arguments Value Author(s) See Also Examples

View source: R/simprof-dendrogram.R

Description

A function to plot a dendrogram based on the results of simprof().

Usage

1
2
simprof.plot(results, leafcolors=NA, plot=TRUE, fill=TRUE, 
leaflab="perpendicular", siglinetype=1)

Arguments

results

The object returned by simprof. However, the only parts "results" needs to have are "hclust" and "significantclusters".

leafcolors

A vector of color names/identifiers (names or hex codes); it should be the same length as "results$significantclusters". If this isn't supplied, the rainbow function will be used to generate enough colors (recommended). Because the colors are used in the order generated by rainbow, if there are a large number of significant clusters, they may appear to form a continuous color spectrum. If this is the case, the appropriate option is to manually supply a vector of colors to more clearly delineate different clusters.

plot

A logical option indicating whether to plot the dendrogram ("TRUE" for plot).

fill

A logical option indicating whether to color the entire subtree which comprises a signficant color (as opposed to just coloring the individual leaves).

leaflab

The option from dendrogram indicating the label text orientation. Possible values are "perpendicular" (vertical), "textlike" (horizontal), or "none" (labels suppressed).

siglinetype

A numeric option indicating the type of line to use for the significant clusters (the line type chosen applies to all significant clusters). The possible values are 0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash, and "different". This can be a vector of line-types to use; in the event that there are fewer available line-types than there are significant groups, some line-types will be repeated. The selection of "different" will use try to automatically use as many different line-types as necessary to have a unique type for each significant group (the line-types will be used in the order of 6 through 1 so that solid is used last to increase clarity).

Value

A dendrogram is returned. If "plot=TRUE", the dendrogram is also plotted.

Author(s)

Douglas Whitaker and Mary Christman

See Also

hclust, dendrogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Load the USArrests dataset included with R
# And use abbreviations of state names
# We leave out the third column because
# it is on a different scale
usarrests<-USArrests[,c(1,2,4)]
rownames(usarrests)<-state.abb
# Run simprof on the data
res <- simprof(data=usarrests, 
method.distance="braycurtis")
# Graph the result
pl.color <- simprof.plot(res)

## End(Not run)

clustsig documentation built on May 1, 2019, 10:19 p.m.