Displaying 20 results from an estimated 5000 matches similar to: "plot.hclust: strange behaviour with "manufactured" hclust object"
2002 Feb 21
0
plot.hclust: strange behaviour with "manufactured"
This worked for me with your example:
source("dumpdata.R")
storage.mode(x.hc$merge) <- "integer"
plot(x.hc)
(R-1.4.1 compiled from source on WinNT4.)
Andy
> -----Original Message-----
> From: Hugh Chipman [mailto:hachipma at icarus.math.uwaterloo.ca]
> Sent: Wednesday, February 20, 2002 5:32 PM
> To: andy_liaw at merck.com
> Cc: r-help at stat.math.ethz.ch
2003 Jun 17
1
User-defined functions in rpart
This question concerns rpart's facility for user-defined functions that
accomplish splitting.
I was interested in modifying the code so that in each terminal node,
a linear regression is fit to the data.
It seems that from the allowable inputs in the user-defined functions,
that this may not be possible, since they have the form:
function(y, wt, parms) (in the case of the
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 =
2003 Nov 04
1
hclust doesn't return merge details [Solved]
Thanks to Andy and Thomas,
Reading help(hclust) more carefully would have done it but sometimes you do not
see the wood for the trees...
So hc$merge does exactly what I want.
I have never been aware of the command str to get the structure of an R-object. It
seems pretty useful to me.
Thanks,
Arne
> -----Original Message-----
> From: Liaw, Andy [mailto:andy_liaw at merck.com]
>
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?
2003 Nov 03
2
hclust doesn't return merge details
Dear R-users,
I tried to receive the merge details of a clustering by using the
summary function of hclust.
For illustration I use the Longley data as done by Prof Ripley (Wed 11
Apr 2001)
d <- dist(longley.y)
d <- d/max(d)
hc <- hclust(d, "ave")
But instead of getting a matrix for $merge I get:
>summary(hc)
Length Class Mode
merge 30 -none- numeric
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),
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)
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
2009 Nov 17
1
hclust too slow?
Hi,
I am new to clustering in R and I have a dataset with approximately 17,000
rows and 8 columns with each data point a numerical character with three
decimal places. I would like to cluster the 8 columns so that I get a
dendrogram as an output. So, I am simply creating a distance matrix of my
data, using the 'hclust' function, and then plotting the results (see below,
my data is
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
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
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
2004 Jul 19
2
hclust error
Hello,
I'm trying to do a cluster analysis on a large data set. I
tried it out with a smaller one first, but I got this error:
> hc<-hclust(dist(x),"ave")
Error: cannot allocate vector of size 4129151 Kb
The data sample used (i.e. "x") is a numerical data set of size 32513 by 31
Does anyone know how I can do this analysis? Is R capable of this
2004 Oct 11
2
hclust title and paste - messed up
I use the following code to scan a (limited) parameter space of clustering
strategies ...
data <- read.table(...
dataTranspose <- t(data)
distMeth <- c("euclidean",
"maximum",
"manhattan",
"canberra",
"binary"
)
clustMeth <- c("ward",
2003 May 06
1
S's plclust and R's hclust
Hello everyone,
Does anyone know how to implement the argument "unit" in R's plclust
function ? I used to use Splus where this argument exists but it has not
been implemented in R's plclust. The reason why I switched from Splus to
R is that Ward's method is not implemented for S's hclust whereas it is
implemented for R's hclust. What I would need is S's plclust
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
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
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 <-
2000 Jul 20
3
printing hclust with k clusters
howdy R friends,
I've searched CRAN but to no avail... I'm trying to use mva's hclust and
print out for say 10 clusters in batch. How do I do this? It's unclear if
I can use cutree.
thanks,
John Strumila
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send