Displaying 20 results from an estimated 10000 matches similar to: "recursive function, how to avoid list structure in return value"
2009 Jun 19
1
Drawing dendrogram
Dear all,
I would like to draw a dendrogram and mark some parts/branches (by using "segments") including their labels. If I draw it without specifying the length of x axix, I am able to do that (as in My dendrogram 1 of the following codes). However, if I want to specify the x axix, I am not able to draw marking line (by using "segments") including labels (as in My dendrogram
2005 Jul 11
1
indexing into and modifying dendrograms
I would like to be able to exert certain types of control over the
plotting of dendrograms (representing hierarchical clusterings) that I
think is best achieved by modifying the dendrogram object
prior to plotting. I am using the "dendrogram" class and associated
methods.
Define the cluster number of each cluster formed as the corresponding
row of the merge object. So, if you are
2007 Mar 07
1
compiling latest version of R
Dear R-help community,
I have had trouble in the past installing the latest version of R: we got the
errors shown below (the computer specifications and version of R are below
that). Does anybody have tips for compiling the latest version of R so that I
can avoid these errors?
configure
make
...
...
...
f90: CODE: 0 WORDS, DATA: 0 WORDS
gcc -G -L/usr/local/lib -o stats.so init.o kmeans.o
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
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
2006 Apr 18
2
questioin about cluster in R
Hi,All.Sorry for the group mail.
I recently met a question and I have struggled on that for a while but
failed to found the solution.
I have a distance matrix as below.
---
0 35 33 9 36
35 0 10 32 51
33 10 0 30 49
9 32 30 0 35
36 51 49 35 0
-------------------
I want to do cluster with average method.
----
rown<-c("A",
2005 Sep 15
2
about cutree
Hi Everyone,
I'm trying to use cutree to get the clusters after hclust. What I used is: mycluster<-cutree(cnclust,h=0.5)
Now, my problem is, how can I get the actual clusters? Thanks!
Best,
Baoqiang Cao
2012 Oct 24
0
recursive function on a structured list of lists (dendrogram)
Dear all,
I have been trying the following without avail and would be very grateful for any help. From a dendrogram (recursive list of lists with some structure), I would like to obtain some information of the component lists and of the enclosing list at the same time. In dendrogram-speech I basically would like the label of the leaf and the height of the enclosing branch.
A dendrogram example
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
2006 Nov 20
3
problem with loop to put data into array with missing data forsome files
Hi Jenny
If you want a general solution I understand.
However I just downloaded the file fine (as far as I can tell) so you
are welcome to have a copy. I can email it to you if you want.
I do not think your test for NA is valid. i.e
if(test != "NA"){
}
I think you should use
if(is.na(test)){
}
Or something similar.
J
---
John Seers
Institute of Food Research
Norwich
2007 Mar 16
1
Problem installing R onto Solaris 2.10 system - need advice!!!!!
Dear R-Help friends,
I am unable to get the latest version of R (2.4.1) to compile on my solaris 10
system - has anybody else experienced this problem and are you able to offer me
any advice?
I appreciate your time, many thanks,
Jenny Barnes
Here are my CURRENT specifications:
platform sparc-sun-solaris2.10
arch sparc
os solaris2.10
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]
>
2002 Dec 17
0
Coloured label, terminal branch and bars in dendograms
Dear R-help,
I have performed a hierarchical clustering on some data that I have and
would like to know some nice ways of visualizing it. I have 2 related
questions:
i) How to color the labels AND the terminal branch of a dendogram? This
is my inelegant way of just getting the colored labels.
data(iris) # Formatting data into required format
ir <- iris[ ,-5]
ir.class <- c(
2001 Jun 12
1
cophenetic matrix
Hello,
I analyse some free-sorting data so I use hierarchical
clustering.
I want to compare my proximity matrix with the tree
representation to evalute the fitting. (stress, cophenetic correlation
(pearson's correlation)...)
"The cophenetic similarity of two objects a and b is defined as the
similarity level at wich objects a and b become members of the same
cluster during the course of
2006 Jul 06
0
pvclust Error:NA/NaN/Inf in foreign function call (arg 11)
Hi all,
I'm new to R and I'm struggling to decipher an error message. Briefly, I am trying to use the pvclust package to do hierarchical clustering of some CGH data. The data is from the Progenetix CGH database. It is arranged as a table where each column is a single case and each row is a single chromosome band. The value in each cell is either 0, 1, 2, or -1. Corresponding to no change,
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
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
2011 Jul 14
1
recursive function - finding connections
Dear all,
I'm having some problems getting my recursive function to work. At first I though that maybe my data was too big and I increase option(expressions=50000). Then I thought that I would try it on some smaller data. Still not working. :(
I would have thought there should be a function for this already, so any suggestions are welcomed for other methods. I did try igraph but couldn't
2001 Apr 27
0
weithed clustering (was: Re: problems with a large data set)
kmeans and clara work great. Thank you for the tip.
I have another question:
Is it possible to weight the observations in a cluster analysis ? I haven't
found any mention of this in the kmeans of clara help texts.
Moritz Lennert
Charg? de recherche
IGEAT - ULB
t?l: 32-2-650.65.16
fax: 32-2-650.50.92
email: mlennert at ulb.ac.be
> On Wed, 25 Apr 2001, Moritz Lennert wrote:
>
2014 Jul 25
0
clustering with hclust
Hi everybody, I have a problem with a cluster analysis.
I am trying to use hclust, method=ward.
The Ward method works with SQUARED Euclidean distances.
Hclust demands "a dissimilarity structure as produced by dist".
Yet, dist does not seem to produce a table of squared euclidean distances,
starting from cosines.
In fact, computing manually the squared euclidean distances from cosines