Displaying 20 results from an estimated 10000 matches similar to: "help with plot hclust tree"
2011 Jan 12
3
Problems creating a PNG file for a dendrogram: "Error in plot.window(...) : need finite 'xlim' values"
Has anyone successfully created a PNG file for a dendrogram?
I am able to successfully launch and view a dendrogram in Quartz. However, the dendrogram is quite large (too large to read on a computer screen), so I am trying to save it to a file (1000x4000 pixels) for viewing in other apps. However, whenever I try to initiate a PNG device, I get a "need finitite 'xlim' values"
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 <-
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:
2010 Sep 22
0
How to Ignore NaN values in Rows when using hclust function in making Heatmap??
I am making heatmaps for a dataset (~ 300*600 matrix) with the following R
script (I am not familiar with R and this is the first time I am using it).
library("gplots")
library("Cairo")
mydata <- read.csv(file="data.csv", header=TRUE, sep=",")
rownames(mydata)=mydata$Name
mydata <- mydata[,2:297]
mydatamatrix <- data.matrix(mydata)
mydatascale
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
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 <-
2013 Jan 18
1
Hclust tree to Figtree w/ branch lengths
Hi,
I'm doing hierarchical clustering, and want to export my dendrogram to a
tree-viewing/editing software. I can do this by converting the data to
Newick format (hc2Newick in ctc package), but I can't get branch lengths to
show in the resulting phylogram. I figured it might help to convert my
hclust object into a phylo object (as.phylo in ape package), but the
following lines give me
2012 Jul 10
1
identify.hclust() doesn't cut tree at the vertical position of the mouse pointer
Dear All
According to the identify.hclust documentation the function "cuts the tree at the vertical position of the pointer and highlights the cluster containing the horizontal position of the pointer".
When I carry out this, the tree isn't cut where I click - in fact, there seems to be a limit below which I cannot go.
Consider the following code:
mat <- matrix(rnorm(5000),
2006 Jul 10
2
pvclust missing values problem
Hello all,
I posted a question to this list last week and received no response. I am unsure if this means no-one knows the answer or if I posed the question badly. I'm going to assume I posed the question badly and try again. I am new to R so it is quite likely it's a very naive question, however if there is something blindingly obvious that I am missing or if there is another resource I
2005 Mar 03
2
Putting different colors on labels in plot (hclust)
Hi All R-helpers
This is my first (but probartly not last ;-) mail to R-help, so hello to everybody.
My problem: Is there a way to give colors to the labels (sample labels) in plots for a hclust object for better visualization?
I have looked through plot, points, hclust and more but cannot find anything on label color. Anybody know if this is doable?
Best regards Jeppe
2012 Feb 23
2
Advice on exploration of sub-clusters in hierarchical dendrogram
Dear R user,
I am a biochemist/bioinformatician, at the moment working on protein
clusterings by conformation similarity.
I only started seriously working with R about a couple of months ago.
I have been able so far to read my way through tutorials and set-up my
hierarchical clusterings. My problem is that I cannot find a way to obtain
information on the rooting of specific nodes, i.e. of
2009 Nov 10
2
All possible combinations of functions within a function
Dear All,
I wrote a function for cluster analysis to compute cophenetic correlations
between dissimilarity matrices (using the VEGAN library) and cluster
analyses of every possible clustering algorithm (SEE ATTACHED)
http://old.nabble.com/file/p26288610/cor.coef.R cor.coef.R . As it is now,
it is extremely long, and for the future I was hoping to find a more
efficient way of doing this sort of
2009 Sep 21
0
Help needed to clarify hclust and cutree algorithms
Dear R Helpers,
I read carefully the documentation and all postings on the hclust and cutree functions, however some aspects of the tree ordering and cluster assignment performed by these functions remain unclear to me, so I would very much appreciate your help in making sure I get them right.
Here is an example, with values chosen to illustrate the problems.
I have a set of five profiles
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 <-
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
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 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 May 30
1
hclust.identify problem
Having some problems with using hclust.identify on my data, I revert to trying
it out on the example in the help manual. My result is still the same (as with
my own data):
data(iris)
hci <- hclust(dist(iris[,1:4]))
plot(hci)
testx<-identify.hclust(hci)
Error in rect.hclust(x, k = k, x = x$x, cluster = cluster[, k - 1], border
= "red") :
k must be between 2 and 0
2010 Dec 27
1
Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)
Hello all,
I'm now working with hclust objects and was hoping to perform some basic
editing on them like:
- Joining = the merging of two hclust objects (so they will share one
root)
- Splicing = So to cut/extract a branch out of an hclust object - that by
itself will be an hclust object.
I noticed I could extract one element of an hclust object by turning it into
a dendrogram,
2012 Oct 11
2
extracting groups from hclust() for a very large matrix
Hello,
I'm having trouble figuring out how to see resulting groups (clusters)
from my hclust() output. I have a very large matrix of 4371 plots and 29
species, so simply looking at the graph is impossible. There must be a
way to 'print' the results to a table that shows which plots were in
what group, correct?
I've attached the matrix I'm working with (the whole thing