Displaying 20 results from an estimated 8000 matches similar to: "Finding an order for an hclust (dendrogram) object without intersections"
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,
2010 Feb 21
1
How to: Compare Two dendrograms (Hierarchical Clusterings) ?
Hello all,
I wish to compare two dendrograms (representing Hierarchical Clusterings).
My problems are several:
1) how do I manually create a dendrogram object ?
That is, how can I reconstruct it as an "hclust" object that creates such a
dendrogram, when all I have is the dendrogram image (but don't have the
underlaying distance matrix that produced it) ?
I see that there is a
2006 Mar 09
1
Identifying or searching for labels in a hclust/dendrogram/heatmap
Hi
Sorry if this is in the help :-S
I've looked at example(dendrogram) and though it gives some indication of what I want, it doesn't do all.
OK, so here is what I want to do: draw a tree, and then have an action, on user-click, to either draw a sub tree or a plot of the data. I also want users to be able to search for a particular label and have it highlighted on the tree, say in
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:
2017 Mar 23
1
A question on stats::as.hclust.dendrogram
Hi all,
This is the first time I'm writing to R-devel, and this time I'm just asking for the purpose for a certain line of code in stats::as.hclust.dendrogram, which comes up as I'm trying to fix dendextend.
The line in question is at line 128 of dendrogram.R in R-3.3.3, at stats::as.hclust.dendrogram:
stopifnot(length(s) == 2L, all( vapply(s, is.integer, NA) ))
Is there any
2010 Dec 13
2
How to change leaf color by group in hclust plot or how to install A2R package in windows?
I want to change leaf color by group in hclust plot.
I've seen several answers about A2R package but I cannot install A2R
and Rtools in windows.
Do you know how to install A2R package in windows or how to change
leaf color by group in hclust plot?
Thank you in advance,
Soyeon
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
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
2003 Sep 17
1
plot.hclust: dendrogram too large for window (PR#4197)
plot.hclust:
Setting up a window for a dendrogram assumes the first link is
the shortest and the last is the longest. This is not always the
case when the clustering was done with hclust, method="median"
or method="centroid", and the dendrogram sometimes doesn't fit
within the window.
I propose the fix listed below.
src/main/
--- plot.c Wed Sep 17 01:03:39 2003
+++
2004 Dec 15
1
hclust and heatmap - slightly different dendrograms?
Good afternoon,
I ran heatmap and hclust on the same matrix x (strictly, I ran
heatmap(x), and hclust(dist(t(x))), and realized that the two
dendrograms were slightly different, in that the left-right
arrangement of one pair of subclusters (columns) was reversed in the
two functions (but all individual columns were grouped correctly).
Looking through the code for heatmap as a most definite
2003 Sep 26
1
a. crossing branches with hclust, b. plot.dendrogram
Hello,
a. when I use hclust with the methods media, centroid, and mcquitty,
and plot the results, the dendrograms have lines that are crossing each
other. Is this ok?
b. My next question refers to plot.dendrogram: How can I use parameters
as "hang" or "cex" here? E.g. for
st <- as.dendrogram(subtreeshc[[x]])
I would like to have something like this, where cex and hang
2004 Oct 19
1
plot.dendrogram and plot.hclust ZOOM into the height?
Hi,
I clustered a distance matrix and would like to draw it using
plot.hclust or plot.dendrogram.
The dendrogram is not informative because I have a few extremely small
dissimilarities in the distance matrix (e.g. 0), but most of the other
distances are in the range 1e10+-5000.
I would like to show the tree only for the height of 1e10+-5000 but
unfortunately their are no parameter like
2009 Oct 14
1
Understanding hclust and dendrogram
?hclust listed several references. I'm wondering what is the best
resource that explained clustering algorithms, dendrogram and various
clustering algorithms that are implemented in R. Thank you!
2015 May 18
2
A "bug" in plot.dendrogram - can't plot lty with character color
The problem:
===========
Once a dendrogram has a branch with both a line type AND a color (which is
a character color), the plot.dendrogram function will not plot and return
an error.
I say this is a bug because (I believe), we would like a dendrogram to be
able to use character colors, while also allowing control over line types.
This e-mail includes an example, and what I think a solution
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
2009 Apr 03
0
dendrogram rect.hclust() not working?
I have tried to use rect.hclust() to draw a rectangle around a set of
leaves, but am running into trouble.
The rect.hclust() is drawing two rects instead of one, and of the
wrong size:
--------------------
scoreClusterObj <- hclust(scoreDistanceObj, method=clustMethod)
order <- scoreClusterObj$order
orderedLabels <- rep(0, length(order))
for (orderIndex in 1:length(order)) {
# this
2010 Jun 13
0
How to write a customized hclust algorithm in R?
Hello dear R-help mailing list members,
I wish to create an hclust object which will be based on
a customized hierarchical clustering algorithm, programmed in R.
After looking into the hclust function, I noticed that the algorithms
themselves are implemented in Fortran. In order for me to implement my
algorithm in R, it would be very helpful if there was some example of
implementing (even one
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
2008 Aug 01
0
hclust interrogation & use of $merge for dendrogram annotation?
Hi all,
I've been doing some investigation to see if it is possible to implement an hclust/dendrogram related requirement that I've been given. So far ?hclust and a lot of googling haven't provided the information I'm looking for (I've been using R sporadically for a year).
The requirement I have is to:
On a dendrogram plot, draw points at various merge locations, based on
2013 Jan 16
1
dendrogram stops!
Dear I am using the 'as.dendrogram' function from the 'stats' library to convert from an hclust object to a dendrogram with a dataset of size
~30000 (an example code is below). I need the dendrogram structure to
use the "dendrapply" and "attributes" functions and to access the child
nodes, I do not need any of the plot properties.
The problem is that it