similar to: Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)

Displaying 20 results from an estimated 9000 matches similar to: "Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)"

2010 Jun 17
1
plotting radial dendrograms
Dear list, I am trying to plot a radial dendrogram using the ape package, which requires my data to be of class 'phylo'. Currently I have my dendrogram stored as an object of class 'dendrogram' which was produced from an outside bit of C code, but was made into an object of class 'igraph.eigenc' and converted to a dendrogram using 'as.dendrogram()' from the igraph
2013 Jan 18
1
Hclust tree to Figtree w/ branch lengths
Hi, I'm doing hierarchical clustering, and want to export my dendrogram to a tree-viewing/editing software. I can do this by converting the data to Newick format (hc2Newick in ctc package), but I can't get branch lengths to show in the resulting phylogram. I figured it might help to convert my hclust object into a phylo object (as.phylo in ape package), but the following lines give me
2003 Jul 13
1
bootstrap for hclust
dear group members, I am looking for a function that assess the stability of cluster. The result of hclust function is an hclust object which can be plot as a dendrogram. However to have confidence in the tree topology usualy bootstap is applied. I understand that I can apply bootstarp on the original data and then run hclust(dist() ) as much as I resampled but how to comapre the topologies the I
2006 Jan 17
0
Cannot convert from phylo to hclust , error!!???
Hello, The following code does'nt work for me. The last command reports an error. I have created a consensus tree using the consensus comand from phylo but cannot manipulate the phylo object afterwards to create a dendogram , by transforming the phylo object into a hclust object and then into a dendogram ?? Thanks for any help library(ade4) library(cluster) library(stats) library(ape)
2010 Dec 09
0
convert non-ultrametric phylo to dendrogram
I am beginning to work with the 'ape' package in R, and have run into some trouble. I generated a UPGMA tree based on DNA sequence distance in Paup* and read it into R, where it became an object of class "phylo". However, I need it to be classified as a "dendrogram" for my purposes (to use it to order the layout of a heatmap). I get an error using as.hclust.phylo
2011 Dec 14
0
hclust and ggplot2
I saw an example online of taking hclust dendrogram and plotting it using ggplot2 and thought I would give it a try to see what it would look like. I get an error when trying to use ggplot; Error: ggplot2 doesn't know how to deal with data of class phylo. Regular plot works fine but I can't get ggplot2 to work. see code below.... rows=100 columns=100 #create matrix
2007 Mar 02
0
Dice dissimilarity output and 'phylo' function in R
Dear All, I get some problems using the 'phylo' and dissimilarity functions in R. I converted an output from 'hclust' into an order of phylo so as to be able to use the 'consensus' function on it. Each time I submit the consensus codes, my computer hangs. When I tried to see what the contents of the object converted into order phylo is, I get the message
2009 Nov 16
3
Cluster analysis: hclust manipulation possible?
I am doing cluster analysis [hclust(Dist, method="average")] on data that potentially contains redundant objects. As expected, the inclusion of redundant objects affects the clustering result, i.e., the data a1, = a2, = a3, b, c, d, e1, = e2 is likely to cluster differently from the same data without the redundancy, i.e., a1, b, c, d, e1. This is apparent when the outcome is visualized
2006 Mar 09
1
Identifying or searching for labels in a hclust/dendrogram/heatmap
Hi Sorry if this is in the help :-S I've looked at example(dendrogram) and though it gives some indication of what I want, it doesn't do all. OK, so here is what I want to do: draw a tree, and then have an action, on user-click, to either draw a sub tree or a plot of the data. I also want users to be able to search for a particular label and have it highlighted on the tree, say in
2004 Dec 15
1
hclust and heatmap - slightly different dendrograms?
Good afternoon, I ran heatmap and hclust on the same matrix x (strictly, I ran heatmap(x), and hclust(dist(t(x))), and realized that the two dendrograms were slightly different, in that the left-right arrangement of one pair of subclusters (columns) was reversed in the two functions (but all individual columns were grouped correctly). Looking through the code for heatmap as a most definite
2010 Jul 19
1
possible bug in ape::extract.clade()
Hi, I was recently splitting some massive phylo class objects with extract.clade() and noticed what appears to be a bug in how tip labels are copied from the full tree to the pruned tree. This possible bug was also mentioned here: http://www.mail-archive.com/r-sig-phylo at r-project.org/msg00537.html An example: library(ape) set.seed(5) x <- matrix(rnorm(100), ncol=10) p <-
2002 Feb 20
1
plot.hclust: strange behaviour with "manufactured" hclust object
I've been trying to get plot.hclust to work with a hclust object I created and have not had much success. It seems that there is some "hidden" characteristic of a hclust object that I can't see. This is most easily seen in the following example, where plot.hclust works on one object, but when this object is "dumped" and then re-read, plot.hclust no longer works. Is
2017 Mar 23
1
A question on stats::as.hclust.dendrogram
Hi all, This is the first time I'm writing to R-devel, and this time I'm just asking for the purpose for a certain line of code in stats::as.hclust.dendrogram, which comes up as I'm trying to fix dendextend. The line in question is at line 128 of dendrogram.R in R-3.3.3, at stats::as.hclust.dendrogram: stopifnot(length(s) == 2L, all( vapply(s, is.integer, NA) )) Is there any
2012 May 11
1
How to re-order clusters of hclust output?
Hello, The heatmap function conveniently has a "reorder.dendrogram" function so that clusters follow a certain logic. It seems that the hclust function doesn't have such feature. I can use the "reorder" function on the dendrogram obtained from hclust, but this does not modify the hclust object itself. I understand that the answer should be within the "heatmap"
2007 Apr 25
1
heatmap and phylogram / dendogram ploting problem, ape package
I am having trouble displaying a dendrogram of evolutionary relationships (a phylogram imported from the ape package) as the vertical component of a heatmap, but keeping the hierarchical clustering of the horizontal component. The relationships of the vertical component in the generated heatmap are not that of the dendrogram, although the ordering is. In more detail, I am attempting to generate
2011 Sep 13
2
help with hclust and cutree
Hello, I would like to cut a hclust tree into several groups at a specific similarity. I assume this can be achieved by specifying the "h" argument with the specified similarity, e.g.: clust<-hclust(dist,"average") cut<-cutree(clust,h=0.65) Now, I would like to draw rectangles around the branches of the dendrogram highlighting the corresponding clusters, as is done by
2005 Jan 25
2
Plotting hclust with lot of objects
Hi! I am newbee to R and I am facing the problem in plotting the dedrogram with lot of objects. The lines and labels are overlapped very badly, and writing the graphic to postscript and zooming there is not helping either. I tried cut.dendrogram method, but getting the error that it doesn't exist even though I get the man pages for it. I would not find any solution in web as well, and I
2011 Sep 16
1
cutree() and rect.hclust(): different labelling of classes
I've found that while cutree() and rect.hclust() make the same classes for a given height in the dendrogram, the actual labeling of the classes is different. For example, both produce the same 4 classes but class 1 according to cutree() is class 4 according to rect.hclust(). Would it be possible that future versions provide the same labeling? rect.hclust() is useful to display the classes
2004 May 10
3
Colouring hclust() trees
I have a data set with 6 variables and 251 cases. The people who supplied me with this data set believe that it falls naturally into three groups, and have given me a rule for determining group number from these 6 variables. If I do scaled.stuff <- scale(stuff, TRUE, c(...the design ranges...)) stuff.dist <- dist(scaled.stuff) stuff.hc <- hclust(stuff.dist)
2012 Mar 29
2
hclust and plot functions work, cutree does not
Hi, I have the distance matrix computed and I feed it to hclust function. The plot function produces a dense dendrogram as well. But, the cutree function applied does not produce the desired list. Here is the code x=data.frame(similarity_matrix) colnames(x) = c(source_tags_vec) rownames(x) = c(source_tags_vec) clust_tree=hclust(as.dist(x),method="complete") plot(clust_tree)