Re: [R] hclust and plot functions work, cutree does not

2012-04-03 Thread vinod1
Sarah, . clust_tree=hclust(as.dist(x),method=complete) . plot(clust_tree) this produces a dendrogram, whereas . clust_tree=hclust(as.dist(x),method=complete) .cut = cutree(clust_tree,k=1:5) .plot(cut) produces a plot with 2 dots. The dissimilarity matrix x is

Re: [R] hclust and plot functions work, cutree does not

2012-04-03 Thread Peter Langfelder
On Tue, Apr 3, 2012 at 2:41 AM, vinod1 vinod.hegd...@gmail.com wrote: Sarah, .       clust_tree=hclust(as.dist(x),method=complete) .       plot(clust_tree) this produces a dendrogram, whereas .       clust_tree=hclust(as.dist(x),method=complete) .        cut = cutree(clust_tree,k=1:5) .  

[R] hclust and plot functions work, cutree does not

2012-03-29 Thread Vinod Hegde
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)

Re: [R] hclust and plot functions work, cutree does not

2012-03-29 Thread Sarah Goslee
What does does not work mean? Do you get an error message? Or a warning? Or a result, but one that isn't what you expected? Did you look at the results of the example in ?cutree to make sure what the function does is what you think it should do? hc - hclust(dist(USArrests))