开发者

R Colored dendrogram suggestions?

I want to make colored dendrograms and have yet to find a sufficient library: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=79 This graphic/library looks promising but cannot install the A2E library? Trying to install on windows, downloaded the tar.gz file and cannot install package from the R console.

In addition:

Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In gzfile(file, "r") :
  cannot open compressed file '开发者_运维百科A2R_0.0-4.tar.gz/DESCRIPTION', probable reason 'No such file or directory'

Can anyone see if they can get this A2R library working, confirm error, or suggest a good colored dendrogram library?


(It might help if you spelled it correctly.) A2R is a source package. So you might need to have the system toolchain for compilation. Those are typically in your system if you are on Linux, but not if you are on a Mac (as I am) or on Windows. The package does compile from source on a Mac. And the compilation process may not have needed the toolchain. So try this:

install.packages("<fullpath> A2R_0.0-4.tar.gz", type ="source")

There are a few other dependencies: 'trimcluster', 'prabclus' , 'MASS' , 'cluster', 'mclust', 'flexmix', 'modeltools', 'stats4', 'multcomp', 'mvtnorm'. I am able to get most of that graphic but the left side curve does not appear as shown and I did get an error:

     Error in hubertgamma[i] <- cluster.stats(d.usa, cutree(h.usa, k = i +  : 
  replacement has length zero:

R Colored dendrogram suggestions?

If you do not want the heights of the dendrogram scaled to their depth you can add this modification to the hclust object:

h.usa$height <- log(h.usa$height)


You could use the dendrapply() function in R's built-in dendrogram code to apply custom leaf and node coloring. See the following mailing list thread for hints.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜