similar to: cut.dendrogram and cutree

Displaying 20 results from an estimated 400 matches similar to: "cut.dendrogram and cutree"

2005 Jul 11
1
indexing into and modifying dendrograms
I would like to be able to exert certain types of control over the plotting of dendrograms (representing hierarchical clusterings) that I think is best achieved by modifying the dendrogram object prior to plotting. I am using the "dendrogram" class and associated methods. Define the cluster number of each cluster formed as the corresponding row of the merge object. So, if you are
2007 Jun 13
2
Formatted Data File Question for Clustering -Quickie Project
I am trying to learn how to format Ascii data files for scan or read into R. Precisely for a quickie project, I found some code (at end of this email) to do exactly what I need: To cluster and graph a dendrogram from package (stats). I am stuck on how to format a text file to run the script. I looked at the dataset USArrests (which would be replaced by my data and labels) using UltraEdit. That
2002 Mar 05
1
no labels when plotting dendrograms
I'd like to be able to cut dendrograms at a height I specify and then plot the resulting subtrees. I wanted to use the dendrogram object for this purpose because there doesn't seem to be a canned way to cut a hclust object and get a list of hclust objects, but there is a function (cut) that does that for dendrograms. The problem I'm having is that when I plot a dendrogram, I
2011 Jan 25
1
dendrogram plot does not draw long labels ?
Hello, It seems that the plot function for dendrograms does not draw labels when they are too long. > hc <- hclust(dist(USArrests), "ave") > dend1 <- as.dendrogram(hc) > dend2 <- cut(dend1, h=70) > dd <- dend2$lower[[1]] > plot(dd) # first label is drawn > attr(dd[[1]], "label") <- "aaaaaaaaaaaaaaaaaa" > plot(dd) # first label is
2013 May 01
1
help understanding hierarchical clustering
Hi All, i've problem to understand how to work with R to generate a hierarchical clustering my data are in a csv and looks like : idcode,count,temp,sal,depth_m,subs 16001,136,4.308,32.828,63.46,47 16001,109,4.31,32.829,63.09,49 16001,107,4.302,32.822,62.54,47 16001,87,4.318,32.834,62.54,48 16002,82,4.312,32.832,63.28,49 16002,77,4.325,32.828,65.65,46 16002,77,4.302,32.821,62.36,47
2005 Dec 16
2
dendrogram branches with different lty
Dear r-list, I am trying to visually seperate the two main clusters of a dendrogram. The idea is to use: 'edgePar=list(lty=3)' for 'dend1[[1]]' and 'edgePar=list(lty=1)' for 'dend1[[2]]' I have not found a way to solve this. Any suggestions? Patrick hc <- hclust(dist(USArrests), "ave") (dend1 <- as.dendrogram(hc)) par(mfrow=c(2,2)) plot(dend1)
2011 Dec 12
1
how to colour labels (each label with a colour) in a dendrogram?
Hello to all, I still have this doubt. I'd like to colour the different labels of my dendrogram each one with a different colour. How can I do? I guess I could do using *edgetext* and then *t.col* or* lab.col* but I don't know how to add edgetext to my dendrogram. Can you help me please? Example: require(graphics); require(utils) hc <- hclust(dist(USArrests), "ave") (dend1
2012 May 24
4
Manually modifying an hclust dendrogram to remove singletons
Dear R-Help, I have a clustering problem with hclust that I hope someone can help me with. Consider the classic hclust example: hc <- hclust(dist(USArrests), "ave") plot(hc) I would like to cut the tree up in such a way so as to avoid small clusters, so that we get a minimum number of items in each cluster, and therefore avoid singletons. e.g. in this example, you can see
2008 Jun 02
1
Plotting horizontal dendrograms
I am using hclust and plot to produce dendrograms. Using my input data I am able to complete an analysis and obtain a vertical plot. I want to be able to plot the dendrogram horizontally.I am using version 2.6 of R and have updated my packages recently. Using the sample script for dendrograms I can produce a horizontal plot using the instruction horiz = TRUE in plot(). When I use the same
2011 Dec 09
1
how to add an edgetext to a dendrogram?
Hello to all, I'd like to colour the different labels of my dendrogram. How can I do? I guess I could to using *edgetext* and then* t.col* or *lab.col* but I don't know how to add edgetext to my dendrogram. Can you help me please? Example: require(graphics); require(utils) hc <- hclust(dist(USArrests), "ave") plot(dend1) labels (USArrests) [[1]] # to know how many cities
2008 Feb 28
1
Plotting Dendrogram Help Getting Plot to Display Neatly
I have done a cluster analysis doing: 1-clusNorth <-hclust(dist(Artorious)^2, method="ward") 2-clusNorth$labels <-Artorious$Name ## to show the case names and not numbers 3-dend1 <- as.dendrogram(clusNorth) 4-plot(dend1) My Dendrogram is now showing the names of my cases in the dataframe on the x axis 1 OMNICELL INC COM 2 GETTY IMAGES INC
2012 Apr 30
2
Generate Dendrogram
Hi I have a distance matrix which is computed by user defined method. I would like to plot the dendrogram. I would like to use different color and want the leaves laying down bottom. The script like this. I am not familiar with R. I followed the example shown in http://stat.ethz.ch/R-manual/R-devel/library/stats/html/dendrogram.html dist.obj <- as.dist(matrix.distance) hc.obj <-
2015 Jun 06
2
Request: making cutree S3 in R?
Hello all, A question/suggestion: I was wondering if there is a chance of changing stats::cutree to be S3 and use cutree.hclust? For example: cutree <- function(tree, k = NULL, h = NULL,...) { UseMethod("cutree") } cutree.hclust <- stats::cutree # This will obviously need the actual content of stats::cutree This would be nicer for people like me to add new methods to
2004 May 19
7
Help with hclust() and plot()
Hi When I use plot(hclust(dist..)...)...) etc to create a dendrogram of a hierarchial cluster analysis, I end up with a vertical tree. What do I need to do to get a horizontal tree? Also, my users are used to seeing trees who's leaves all "end" at the same place (eg. Like in minitab). Is this possible in R? Thanks Mick Michael Watson Head of Informatics Institute for Animal
2011 Dec 09
1
Help understanding cutree used for Dunn Index
Basic question: Is it correct to assume that when using cutree to set the # clusters (say k=4), cutree determines the clusters by the largest distances among all potential clusters? I've read the R help for cutree and am using it to define the number of groups to obtain Dunn Index scores (using clValid library) for cluster analysis (using Euclidean Distance and Ward's method) More
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)
2012 Oct 24
0
recursive function on a structured list of lists (dendrogram)
Dear all, I have been trying the following without avail and would be very grateful for any help. From a dendrogram (recursive list of lists with some structure), I would like to obtain some information of the component lists and of the enclosing list at the same time. In dendrogram-speech I basically would like the label of the leaf and the height of the enclosing branch. A dendrogram example
2005 Sep 15
2
about cutree
Hi Everyone, I'm trying to use cutree to get the clusters after hclust. What I used is: mycluster<-cutree(cnclust,h=0.5) Now, my problem is, how can I get the actual clusters? Thanks! Best, Baoqiang Cao
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
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