similar to: extracting groups from hclust() for a very large matrix

Displaying 20 results from an estimated 3000 matches similar to: "extracting groups from hclust() for a very large matrix"

2013 Jul 23
1
Heat Map for species - code from Numerical Ecology with R
Hello, I am relatively new to R and I am working through the code that is provided in the book Numerical Ecology with R and I have run across an error message that I can't seem to figure out. I am using the vegan, ade4, gclus and cluster packages. The code is as follows: # Ordered community table # Species are ordered by their weighted averages on site scores or <- vegemite(spe,
2012 Aug 07
5
summing and combining rows
Hello, I have a data set that needs to be combined so that rows are summed by a group based on a certain variable. I'm pretty sure rowsum() or rowsums() can do this but it's difficult for me to figure out how it will work for my data based on the examples I've read. My data are structured like this: Plot SizeClass Stems 12 Class3 1 12 Class4
2012 Apr 05
2
count() function
I keep expecting R to have something analogous to the =count function in Excel, but I can't find anything. I simply want to count the data for a given category. I've been using the ddply() function in the plyr package to summarize means and st dev of my data, with this code: ddply(NZ_Conifers,.(ElevCat, DataSource, SizeClass), summarise, avgDensity=mean(Density),
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
2016 Apr 21
1
Vegemite Function is Cowardly refusing
R version 3.2.2. library(vegan) I was to look at community tables from my dendrograms and am trying out the vegemite command. This is the error I get: Error in vegemite(apst, apst.clusters) : Cowardly refusing to use longer than 1 char symbols: Use scale I thought the problem was that I was using the log transformed data, but I tried it on the raw (which is single digit numbers), and still
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)
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
2000 Jul 20
3
printing hclust with k clusters
howdy R friends, I've searched CRAN but to no avail... I'm trying to use mva's hclust and print out for say 10 clusters in batch. How do I do this? It's unclear if I can use cutree. thanks, John Strumila -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
2016 Apr 08
3
Generating Hotelling's T squared statistic with hclust
I am doing a cluster analysis with hclust. I want to get hclust to output the Hotelling's T squared statistic for each cluster so I can evaluate is data points should be in a cluster or not. My research to answer this question has been unsuccessful. Does anyone know how to get hclust to output the Hotelling's T squared statistic for each cluster? Mike [[alternative HTML version
2006 May 08
1
finding centroids of clusters created with hclust
Hello, Can someone point me to documentation or ideas on how to calculate the centroids of clusters identified with hclust ? I would like to be able to chose the number of clusters (in the style of cutree) and then get the centroids of these clusters. This seems like a quite obvious task to me, but I haven't been able to put my hands on a relevant command. Thank you, Moritz
2013 Aug 22
1
Interpreting the result of 'cutree' from hclust/heatmap.2
I have the following code that perform hiearchical clustering and plot them in heatmap. __ library(gplots) set.seed(538) # generate data y <- matrix(rnorm(50), 10, 5, dimnames=list(paste("g", 1:10, sep=""), paste("t", 1:5, sep=""))) # the actual data is much larger that the above # perform hiearchical clustering and plot heatmap test <- heatmap.2(y)
2011 Sep 12
1
hclust and cutree: identifying branches as classes
Good afternoon, After cuting a hierarchical tree using cutree(), how to check correspondances between classes and branches? This is what we do: srndpchc <- hclust(dist(srndpc$x[1:1000,1:3]),method="ward") #creation of hierarchical tree plclust(srndpchc,hmin=20000) #visualisation srndpchc20000 = cutree(srndpchc,h=20000) #returns 4 classes table(srndpchc20000 ) srndclass20000 =
2003 Dec 11
1
cutree with agnes
Hi, this is rather a (presumed) bug report than a question because I can solve my personal statistical problem by working with hclust instead of agnes. I have done a complete linkage clustering on a dist object dm with 30 objects with agnes (R 1.8.0 on RedHat) and I want to obtain the partition that results from a cut at height=0.4. I run > cl1a <- agnes(dm, method="complete")
2003 Dec 11
1
cutree with agnes
Hi, this is rather a (presumed) bug report than a question because I can solve my personal statistical problem by working with hclust instead of agnes. I have done a complete linkage clustering on a dist object dm with 30 objects with agnes (R 1.8.0 on RedHat) and I want to obtain the partition that results from a cut at height=0.4. I run > cl1a <- agnes(dm, method="complete")
1999 Jul 07
1
hclust
I'm using the hclust method from the package mva (pre-compiled-version on Win NT) and would like to cut the tree in pieces. Have someone implemented the function cutree (as in S-PLUS) in R? Many thanks Markus Huerzeler -- Dr. Markus Huerzeler Phone: +41 / 61 / 686 98 83 AICOS Technologies AG Fax: +41 / 61 / 686 98 88 Efringerstrasse 32 mailto:mhuerzeler at
2011 May 17
1
simprof test using jaccard distance
Dear All, I would like to use the simprof function (clustsig package) but the available distances do not include Jaccard distance, which is the most appropriate for pres/abs community data. Here is the core of the function: > simprof function (data, num.expected = 1000, num.simulated = 999, method.cluster = "average", method.distance = "euclidean", method.transform =
2011 Dec 12
1
Is there a way to print branch distances for hclust function?
The R function hclust is used to do cluster analysis, but based on R help I see no way to print the actual fusion distances (that is, the vertical distances for each connected branch pairs seen in the cluster dendrogram). Any ideas? I'd like to use them test for significant differences from the mean fusion distance (i.e. The Best Cut Test). To perform a cluster analysis I'm using: x
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
2001 Aug 01
2
clustering question ... hclust & kmeans
I am using R 1.3.0 on Windows 2000. For an experiment, I am wanting to find the most diverse 400 items to study in a possible 3200 items. Diversity here is based on a few hundred attributes. For this, I would like to do a clustering analysis and find 400 clusters (i.e. different from each other in some way hopefully). From each of these 400 clusters, I will pick a representative. I expect
2004 Jul 21
2
Cutting heatmap dendrogram
Hello, I've been clustering my data using hclust and cutting the resulting tree with cutree. Separately, I visualize the clusterings with heatmap. Is it possible to have the dendrogram on the heatmap reflect the cutree results? That is, instead of having one large dendrogram, it would have 4 or 25 in the example below. Any guidance on if that's possible or not, and what kinds of