Displaying 20 results from an estimated 5000 matches similar to: "Colouring hclust() trees"
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 <-
2006 Mar 06
2
Problems with heatmap.2 in the gregmisc package
Hi
Sorry to revisit an old problem, I seemed to solve this in 2004, only
for it to resurface :-S
I am trying to plot a heatmap, and I don't want the columns of my matrix
re-ordered. The function doesn't seem to behave as the help would have
you believe:
a <- matrix(rnorm(100),nr=20)
a.d <- dist(a)
a.hc <- hclust(a.d)
a.de <- as.dendrogram(a.hc)
# columns are re-ordered
2004 Sep 02
3
Problems with heatmap.2
Hi
When I give the command:
>
heatmap.2(as.matrix(d),Rowv=as.dendrogram(hc.gene),Colv=FALSE,scale="row
",trace="none",col=greenred.colors(79))
The resulting heatmap has re-ordered my columns! This is time-course
data, and I don't want my columns re-ordered! Note from the help:
Rowv: determines if and how the _row_ dendrogram should be
reordered.
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
2011 Mar 02
2
clustering problem
Hi,
I have a gene expression experiment with 20 samples and 25000 genes each.
I'd like to perform clustering on these. It turned out to become much faster
when I transform the underlying matrix with t(matrix). Unfortunately then
I'm not anymore able to use cutree to access individual clusters. In general
I do something like this:
hc <- hclust(dist(USArrests), "ave")
2009 Aug 24
1
Saving heatmaps as PDFs
Hi,
I'm trying to save heatmaps as PDFs. However, the PDF version of the
heatmaps (Heatmap_CAFvsTNF_run2.pdf) is blurred when compared to its
counterpart, which was saved manually by using the software
"Grab" (Heatmap_CAFvsTNF_run2.tiff).
-----R code--------
sample_output <- "stroma_run2"
filename <-
2005 Oct 23
1
Coloring leaves, twigs and labels in plot.dendrogram()
Core developers,
I couldn't find any simple way to send a vector of colors to apply to each
terminal in plot.dendrogram() or plot.hclust()---I asked R-help about it a
few weeks ago and didn't get any response---so I hacked that functionality
into the plot.dendrgram code (see below for hacked function plus
examples)....
Is there any chance this functionality could be added to the
2010 Sep 08
1
saving heatmaps in graphical format that can be edited in graphic editor tool
I generated a heatmap in R using the following commands:
> mydata <- read.csv(file="Data.csv", header=TRUE, sep=",")
> mydata <- mydata[rowSums(mydata[,-1]^2) >0, ]
> rownames(mydata)=mydata$Name
> mydata <- mydata[,2:253]
> mydatamatrix <- data.matrix(mydata)
> mydatascale <- t(scale(t(mydatamatrix)))
> hr <-
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
2010 Sep 08
2
saving heatmaps in graphical format that can be edited in graphic editor tools
I generated a heatmap in R using the following commands:
> mydata <- read.csv(file="Data.csv", header=TRUE, sep=",")
> mydata <- mydata[rowSums(mydata[,-1]^2) >0, ]
> rownames(mydata)=mydata$Name
> mydata <- mydata[,2:253]
> mydatamatrix <- data.matrix(mydata)
> mydatascale <- t(scale(t(mydatamatrix)))
> hr <-
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
2003 Sep 30
2
dump/source problem with hclust object (PR#4361)
library(mva)
data(USArrests)
hc <- hclust(dist(USArrests), "ave")
plot(hc) # OK
dump(c("hc"), "tst")
rm(hc)
source("tst")
plot(hc) # Error in plot.hclust(hc) : invalid dendrogram input
The same problem occurs with dput/dget
--please do not edit the information below--
Version:
platform =
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
2011 Apr 01
2
hc2Newick is different than th hclust dendrogram
Hi R helpers... I am having troubles because of the discrepancy
between the dendrogram plotted from hclust and what is wrote in the
hc2Newick file. I've got a matrix C:
> hc <- hclust(dist(C))
> plot(hc)
with the:
> write(hc2Newick(hc),file='test.newick')
both things draw completely different "trees"...
I have also tried with the raw distance matrix D and
2010 Jun 23
1
Clustering
Hi,
I use the following clustering methods and get the
corresponding dendrograms for single, complete, average, ward and
kmeans clustering.
This gives the dendrograms, but doesn't show the calculation-way.
My question: is there a possibility to show this calculation steps
(cluster steps) in matrix or graphical form?
Mit freundlichen Gr??en
Ralph Modjesch
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
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
2004 Apr 05
1
rect.hclust fails when k is specified (PR#6740)
Full_Name: Ivan Egorov
Version: 1.8.1
OS: MS Windows 2000, SP4
Submission from: (NULL) (194.186.91.129)
V<-t(matrix(scan('C:/V3.dat'),3))
d<-dist(V)
hc<-hclust(d)
rect.hclust(hc,5)
Error message is displayed:
Read 24 items
Error in rect(m[which[n]] + 0.66, par("usr")[3], m[which[n] + 1] + 0.33, :
plot.new has not been called yet
Here's my data file
2013 May 21
2
Cambiando limites en hclust()
Buenas tardes a todos,
Estoy interesado en cambiar los límites del eje y en un dendograma
construído utilizando la función hclust(). A continuación un ejemplo:
hc <- hclust(dist(USArrests), "ave")
plot(hc)
Hasta aquí todo bien. Si quisiera cambiar los límites del eje "y" de c(0,
200)? Al usar
plot(hc, ylim = c(0, 200))
no observo efecto alguno.
Qué puedo hacer?
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