Displaying 20 results from an estimated 3000 matches similar to: "dendrogram / clusteranalysis plotting"
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 <-
2005 Dec 12
1
dendrogram: how to obtain leaf height
Dear All,
How can the height of a leaf be extracted from a dendrogram?
Sure, I can print it, but I am not able to, say, store it in an object. I think I understand that the height is a property of the split, not the leaf itself, but the printing functions display a "height" or "h" (which changes with "hang") and that is what I want. Obviously, the info is there
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
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
2008 Jan 15
0
clusteranalysis dendrogram
Dear all,
i have a little trouble with cutting an understanding the handling of
dendrogram and hclust.
plotting clusters does work and it delivers a dendrogram. the problem
is that the dendrogram shows lots of pretty small clusters and only
some larger ones.
i know that this has to do with my data. But is there possibility to
tell the plot function just to plot the clusters with more than
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
2010 Apr 13
0
Coloring leaves in Dendrogram according to gene names
Hello,
I am a new R user and have a question regarding dendrogram coloring.
I would like to color each leaf in the dendrogram (dhc) according to a
specific criterion. For me this criterion is the gene name.
For this, I created a data.frame with 2 variables: The gene name and the
corresponding color.
Using the following function, adapted from "dendrapply {stats}", I still
have the same
2006 May 24
1
dendrogram plotting problem
Dear List
RGui Version : 2.3.0
User : 1 month
I am having the *dendrogram plotting problem *
The code i tried:
>library(cluster)
DD<-DataSetS01022 # 575 x 2 matrix
> VC<-hclust(dist(DD),"ave")
*Warning message:
NAs introduced by coercion* ( what does it mean? Is that the problem?)
> plot(VC,hang=-2)
Output: http://roughjade.blogspot.com
Can anyone guide me? Thanks
2010 May 25
1
Hierarchical clustering using own distance matrices
Hey Everyone!
I wanted to carry out Hierarchical clustering using distance matrices i have
calculated ( instead of euclidean distance etc.)
I understand as.dist is the function for this, but the distances in the
dendrogram i got by using the following script(1) were not the distances
defined in my distance matrices.
script:
var<-read.table("the distance matrix i calculated",
2004 May 10
3
Colouring hclust() trees
I have a data set with 6 variables and 251 cases.
The people who supplied me with this data set believe that it falls
naturally into three groups, and have given me a rule for determining
group number from these 6 variables.
If I do
scaled.stuff <- scale(stuff, TRUE, c(...the design ranges...))
stuff.dist <- dist(scaled.stuff)
stuff.hc <- hclust(stuff.dist)
2011 Sep 26
0
horizontal labels for a dendrogram
Dear R-help list,
I'd like to create visualize the clustering of a dataset with a
dendrogram. I'm using the following script:
data = read.table("data.csv", header=T, sep=";")
require(cluster)
res = as.dendrogram(agnes(data))
chlab <- function(n) {
if(is.leaf(n)) {
att <- attributes(n)
labx <- data$category1[att$label]
lab_color <- ifelse(labx ==
2007 Mar 09
1
dendrogram again
Hi all,
ok, i know i can cut a dendrogram, which i did.
all i get is three objects that a dendrograms itself.
for example:
myd$upper, myd$lower[[1]], myd$lower[[2]]
and so on. of course i can plot them seperately now.
but the lower parts still have hundreds of branches. i?ll need a 30 "
widescreen to watch the whole picture.
what i?d like to is group the lower branches , so that i get a
2012 Oct 26
0
How to replace the row number for each product by real product name in as.dendrogram in cluster analysis..HELP!
data1<-data.matrix(newdata) # transforming the factor into different values
data.use<-data1[,-c(1,2,3)] # leaving the value matrix
data.dist = dist(data.use)
data.hclust = hclust(data.dist) #complete linkage is used
#if I plot the following one, I have too large data set(rows`=9980), can not see clearly all the product names in graph
2011 Jan 02
1
Clusteranalysis Chi-square test and SingleLinkage
Hi
The short version of my questions is this:
How can I run a chi-square test over a matrix (table) to get the distanaces
between rows and then run a SingleLinkage (or other fusion algorithm over
the resulting table?
------------
The long-version of my question:
My data consists of different data of different countries so I have stuff
like how many people can read, write in X,Y,Z countries
2007 Mar 09
1
how can i group branches of a dendrogram
Hi all,
how can i group branches of a dendrogram ?
thx in advance
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
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
2011 Apr 11
1
heatmap clustering dendrogram export
Hi,
I am a beginner for R.
I had use gplots to generate a heatmap as following:
>heatmap.2(matrix, col=topo.colors(75), dendrogram="column", Rowv=FALSE,
trace="none", key=TRUE, keysize=0.8, density.info="none", cexRow=0.2,
cexCol=0.6)
It work well. It generate heatmap whith rcolumn clustering dendrogram and I
can export a very nice graph. But I don not know how
2010 Nov 15
1
plot.dendrogram() plot margins
Hello,
Is it possible to remove those extra margins on the "sample" axis from
plot.dendrogram:
par(oma=c(0,0,0,0),mar=c(0,0,0,0))
ddr<-as.dendrogram(hclust(dist(matrix(sample(1:1000,200),nrow=100))))
stats:::plot.dendrogram(ddr,horiz=F,axes=F,yaxs="i",leaflab="none")
vs.
stats:::plot.dendrogram(ddr,horiz=T,axes=F,yaxs="i",leaflab="none")
2009 Jan 17
1
Dendrogram with the UPGMA method
Hi,
I am clustering objects using the agnes() function and the UPGMA
clustering method (function = "average"). Everything works well, but
apparently something is wrong with the dendrogram. For example:
x<-c(102,102.1,112.5,113,100.3,108.2,101.1,104,105.5,106.3)
y<-c(110,111,110.2,112.1,119.5,122.1,102,112,112.5,115)
xy<-cbind(x,y)
library(cluster)
UPGMA.orig<-agnes(x)