similar to: splitting clusters

Displaying 20 results from an estimated 3000 matches similar to: "splitting clusters"

2003 Oct 22
1
passing a variable (containing the value of the argument) to a function
My previous question put in a simpler way: How would I pass a value of a variable to a function such as lm(Effect1~Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum))? Here, 'Effect' is a column name in my data matrix, and I want "Effect1" to be replaced by "Effect2" and so on (my other column names in the data frame) for successive anova
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)
2002 May 14
1
cutree() and horizontal dendrograms
When I use the function cutree(), the numbers of the clusters are not in the same order as the plotted dendrogram. Is there any way of sorting them so that they match the tree? Is it possible to plot a dendrogram horizontally, preferably with the branches to the right? This would enable some practical composite plots, e.g. labels that were an entire table with several columns of information, or
2002 Jan 13
1
changing the ordering of leaves in a dendrogram
I'd like to change the way plot.hclust displays an hclust object. Here's a description of how it's done now, from the R documentation of hclust: In hierarchical cluster displays, a decision is needed at each merge to specify which subtree should go on the left and which on the right. Since, for n observations there are n-1 merges, there are 2^{(n-1)} possible
2003 Oct 23
3
Writing and running a R program
Is there a way I can combine multiple lines of R commands (see below) into a little code snippet or a program in a text file, and run it in R to do my analysis? sink("mysink.txt") for (......) { code for creating a dataframe from supplied data code for doing anova from selected data } Thanks very much. Karth.
2011 Jan 24
2
normality and equal variance testing
I currently have a program that automates 2-way ANOVA on a series of endpoints, but before the ANOVA is carried out I want the code to test the assumptions of normality and equal variance and report along with each anova result in the output file.  How can I do this? I have pasted below the code that I currently use.   library(car) numFiles = x #
2004 Jul 19
1
Dendrogram plotting options?
Hi, I was wondering if there is more flexibility in the output of dendrograms when plotting a hclust object. I can't seem to find information on how to change the default output of a "hanging" style tree with the axis on the right to a left-to-right plot with and axis on the bottom. Example code follows: library(vegan) #loads the "vegan" module that compuptes ANOSIM
2001 Aug 06
2
plot.hclust
I want to plot only a part of a denrogramm, which was produced by hclust. In S-Plus I used the function subtree, but I can not find this function or a similar one in R. Thank you for your help, Thomas Pesl -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2011 Sep 13
2
help with hclust and cutree
Hello, I would like to cut a hclust tree into several groups at a specific similarity. I assume this can be achieved by specifying the "h" argument with the specified similarity, e.g.: clust<-hclust(dist,"average") cut<-cutree(clust,h=0.65) Now, I would like to draw rectangles around the branches of the dendrogram highlighting the corresponding clusters, as is done by
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 <-
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
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"
2004 May 06
1
question about plot.dendrogram
hi all, i'm trying to plot a dendrogram with labeled leaves >rownames(f)<-v.names >v<-rowMeans(f, na.rm=T) >clust<-hclust(dist(v)) >dend<-as.dendrogram(clust,hang=0.05) >clust2<-cut(dend, h=0.5) >class(clust2$low[[1]]) >[1] "dendrogram" then >plot(clust2$low[[1]],horiz=TRUE,frame=F,type = "tr")) but my leaf labels do not fit
2005 Nov 02
1
x/y coordinates of dendrogram branches
Dear R-users, I need some help concerning the plotting of dendrograms for hierarchical agglomerative clustering. The agglomeration niveau of each step should be displayed at the branches of the dendrogram. For this I need the x/y coordinates of the branch-agglomerations of the dendrogram. The y-values are known (the heights of the agglomeration), but how can I get the x-values? > mydata
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
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 <-
2006 Mar 29
6
which function to use to do classification
Dear All, I have a data, suppose it is an N*M matrix data. All I want is to classify it into, let see, 3 classes. Which method(s) do you think is(are) appropriate for this purpose? Any reference will be welcome! Thanks! Best, Baoqiang Cao
2004 May 19
7
Help with hclust() and plot()
Hi When I use plot(hclust(dist..)...)...) etc to create a dendrogram of a hierarchial cluster analysis, I end up with a vertical tree. What do I need to do to get a horizontal tree? Also, my users are used to seeing trees who's leaves all "end" at the same place (eg. Like in minitab). Is this possible in R? Thanks Mick Michael Watson Head of Informatics Institute for Animal
2004 Sep 02
3
Problems with heatmap.2
Hi When I give the command: > heatmap.2(as.matrix(d),Rowv=as.dendrogram(hc.gene),Colv=FALSE,scale="row ",trace="none",col=greenred.colors(79)) The resulting heatmap has re-ordered my columns! This is time-course data, and I don't want my columns re-ordered! Note from the help: Rowv: determines if and how the _row_ dendrogram should be reordered.
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