search for: dendro

Displaying 20 results from an estimated 21 matches for "dendro".

2005 Aug 22
2
problem building dendrograms to use with heatmap()
Hi, I'm trying to build dendrograms to pass to heatmap(). The dendrograms I build plot properly, but when I pass them to heatmap() I get the error message "row dendrogram ordering gave index of wrong length" (see output log below). I looked in the code of heatmap() and saw that the error was due to a NULL return value...
2013 Feb 25
0
Argument dendro must have class hclust - cutreeDynamic error
...ot;, 1, FALSE)),+ maxCoreScatter = NULL, minGap = NULL,+ maxAbsCoreScatter = NULL, minAbsGap = NULL,+ maxDistToLabel = cutHeight,+ respectSmallClusters = TRUE, + verbose = 2, indent = 0) But get the following error: Warning in if (class(dendro) != "hclust") stop("Argument dendro must have class hclust.") : the condition has length > 1 and only the first element will be usedError in cutreeDynamic(dd.diana, cutHeight = 2, minClusterSize = 1, method = "hybrid", : Argument dendro must have class hclust....
2009 Nov 17
2
question about function heatmap
...heatmap drawing. The features and samples indeed cluster into several blocks both vertically and horizontally. I can get the index of re-ordered rows and columns after the heatmap drawing by typing the the return variable of the heatmap function. However, I cannot separate these index by the the dendro tree. All the indexes labeled at the bottom and right of the plot all jammed together. I cannot by looking at the plot to find where the borders are. Can someone help? Essentially I want the dendro tree of the genes which are grouped after the clustering so that, e.g., I want to check whether ge...
2016 Apr 21
2
"cophenetic" function for objects of class "dendrogram"
Hello, I have been using the "cophenetic" function for objects of class "dendrogram" and I have realised that it gives different results when it is used with objects of class "hclust". For instance, running the first example in the help file of the "cophenetic" function, d1 <- dist(USArrests) hc <- hclust(d1, "ave") d2 <- cophene...
2010 Aug 06
1
Grouping clusters from dendrograms
Hi, I have produced a dendrogram of categorical data in R using the hclust function, although the input was a dissimilarity matrix produced in SAS, as I have defined my own distances. The dendrogram is fine and I can view and use this. However, I was wondering if there is a method by which I can find out the optimal place to...
2013 Feb 26
1
cutreeDynamic error
...istM = dd.daisy,+ deepSplit = (ifelse(method=="hybrid", 1, FALSE)),+ maxCoreScatter = NULL, minGap = NULL,+ maxAbsCoreScatter = NULL, minAbsGap = NULL,+ maxDistToLabel = cutHeight,+ respectSmallClusters = TRUE, + verbose = 2, indent = 0) But get the following error: Warning in if (class(dendro) != "hclust") stop("Argument dendro must have class hclust.") : the condition has length > 1 and only the first element will be usedError in cutreeDynamic(dd.diana, cutHeight = 2, minClusterSize = 1, method = "hybrid", : Argument dendro must have class hclust. Is t...
2011 Jul 01
1
highlighting clusters in a heatmap
I would like to draw horizontal or vertical lines on a heatmap to highlight the clusters at some specified cut depth of the dendrogram. As a hacked example, the following code would work if I could set the coordinates of the top and bottom of the false color image correctly (ymin and ymax), but the correct values seem to depend on the output device and its size. I realize that heatmaps use a 2x2 layout which makes the coordin...
2016 Apr 21
1
"cophenetic" function for objects of class "dendrogram"
Note that cophenetic.default (which works on the output of hclust(dist(X))) uses the row names of X as labels. as.dendrogram.hclust does not retain those row names so cophenetic.dendrogram cannot use them (so it orders them based on the topology of the dendrogram). Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Apr 21, 2016 at 7:59 AM, William Dunlap <wdunlap at tibco.com> wrote: > I think the resul...
2005 Jul 06
1
Help: Mahalanobis distances between 'Species' from iris
...from 'irisSAS' data? D = matrix(0, n, n) nam = c('Set', 'Ver', 'Vir') rownames(D) = nam colnames(D) = nam k = 0 for (i in 1:n) { for (j in 1:i) { k = k+1 D[i,j] = Mah[k] D[j,i] = Mah[k] } } D=sqrt(D) #D2 -> D library(mclust) dendroS = hclust(as.dist(D), method='single') dendroC = hclust(as.dist(D), method='complete') win.graph(w = 3.5, h = 6) split.screen(c(2, 1)) screen(1) plot(dendroS, main='Single', sub='', xlab='', ylab='', col='blue') screen(2) plot(dendroC, main=...
2016 Apr 21
0
"cophenetic" function for objects of class "dendrogram"
...nonicalize.dist(d3)) [1] TRUE Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Apr 21, 2016 at 2:37 AM, Alberto Fern?ndez Sabater < alberto.fernandez at urv.cat> wrote: > Hello, > > > I have been using the "cophenetic" function for objects of class > "dendrogram" and I have realised that it gives different results when it is > used with objects of class "hclust". For instance, running the first > example in the help file of the "cophenetic" function, > > > d1 <- dist(USArrests) > > hc <- hclust(d1, &q...
2005 Jul 08
5
Help with Mahalanobis
...179.38471, 17.20107, 0) n = 3 D = matrix(0, n, n) nam = c('Set', 'Ver', 'Vir') rownames(D) = nam colnames(D) = nam k = 0 for (i in 1:n) { for (j in 1:i) { k = k+1 D[i,j] = Mah[k] D[j,i] = Mah[k] } } D=sqrt(D) #D2 -> D library(mclust) dendroS = hclust(as.dist(D), method='single') dendroC = hclust(as.dist(D), method='complete') win.graph(w = 3.5, h = 6) split.screen(c(2, 1)) screen(1) plot(dendroS, main='Single', sub='', xlab='', ylab='', col='blue') screen(2) plot(dendroC, main=...
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 t...
2012 Dec 15
2
troubles reading a text file
...full reading of the file always ends up with an error, possibly because of the huge humber of columns .. I believe the problem is with some special encoding but I cannot figure out how to go around it. Could some of you give me any hint on that? many thanks in advance Igor Igor Drobyshev Dendrochronological laboratory at Station de Recheche FERLD, director Chaire industrielle CRSNG-UQAT-UQAM en aménagement forestier durable Université du Québec en Abitibi-Témiscamingue 445 boul . de l'Université Rouyn-Noranda, QC Canada J9X5E4 http://www.dendro.uqat.ca/ [[alternative HTML version de...
2002 May 31
2
Matrix-like plot
...rix containing percentage abundance data. I have two cluster analyses one of the samples and one of the species, and have ordered the rows and columns of the species by samples matrix according to these two cluster analyses. So far so good! Now what I want to do is create a plot with the species dendrogram at the top of the plot, the samples dendrogram to the left of the plot and then in the main plotting area plot the abundances held in the cells of the matrix. I know how to split the plotting region up so that it looks somewhat like this: ---------------------- |...
2006 May 16
0
reordering materix presentation in heatmap.2 in the 'gplots' library
...the same row and column names For the first matrix I'm using the default clustering and column denrogram options: heatmap.2(Matrix1, symm=T, breaks=20, col=rich.colors(19), main="matrix1", density.info="histogram", denscol="black", trace="none", na.rm=T, dendrogram="col", Colv=T) I would like to show the second matrix with the same row and column ordering of the first matrix. I've tried using the following to create dendrogram objects of the first matrix: z=heatmap(Matrix1, keep.dendro = T, symm=T, breaks=seq(min(Matrix1),max(Matrix1),len=...
2012 Jun 28
0
neatmap - draw.dendrogram - help!
Hi all, I'm having a problem where by I'm trying to use the NeatMap draw.dendrogram function as it is more versatile in placement/direction of dendrograms, instead of the limited plot function. Using plot I can get my dendrograms to display the species name for each leaf of the tree. But I cannot figure out how to make this happen using draw.dendrogram.. genetic<- read.cs...
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...
2017 Mar 06
1
Please add me to bugzilla
...following exactly that sentence and trying to make a minimal post that would waste as little developer bandwidth as possible given the lack of a better system. Anyway, I have been using R for like forever (20 years). In my current project, I have run into problems with stack overflows in R's dendrogram code when trying to use either str() or as.hclust() on very deep dendrograms. To duplicate, use this function from tests/reg-tests-1c.R in the R source code: mkDend <- function(n, lab, method = "complete", ## gives *ties* often: rGen = functio...
2004 Jun 21
1
R 1.9.1 is released
...thod for "POSIXlt" objects. o mean() has a method for "difftime" objects and so summary() works for such objects. o legend() has a new argument 'pt.cex'. o plot.ts() has more arguments, particularly 'yax.flip'. o heatmap() has a new 'keep.dendro' argument. o The default barplot method now handles vectors and 1-d arrays (e.g., obtained by table()) the same, and uses grey instead of heat color palettes in these cases. (Also fixes PR#6776.) o nls() now looks for variables and functions in its formula in the environment of th...
2004 Jun 21
1
R 1.9.1 is released
...thod for "POSIXlt" objects. o mean() has a method for "difftime" objects and so summary() works for such objects. o legend() has a new argument 'pt.cex'. o plot.ts() has more arguments, particularly 'yax.flip'. o heatmap() has a new 'keep.dendro' argument. o The default barplot method now handles vectors and 1-d arrays (e.g., obtained by table()) the same, and uses grey instead of heat color palettes in these cases. (Also fixes PR#6776.) o nls() now looks for variables and functions in its formula in the environment of th...