similar to: cutree() and horizontal dendrograms

Displaying 20 results from an estimated 1000 matches similar to: "cutree() and horizontal dendrograms"

2003 Aug 18
0
displaying pruned clusters
Any idea why clusters five and six fall off the scale in the following? library(cluster) library(maptree) data(flower) dfl2<-daisy(flower,type=list(asymm=c(1,3),ordratio=7)) hdfl2<-hclust(dfl2) prune.dfl2<-prune.clust(hdfl2,k=6) plot(prune.dfl2) Of course the following will display all six clusters, but without a scale: draw.tree(prune.dfl2) Best wishes, Mikkel Mikkel Grum
2003 Sep 02
1
Plotting dates
I'm trying to plot observations against observation dates and getting julian dates along the x-axis: library(date) Week<-as.date(c("05/02/03","05/09/03","05/16/03","05/23/03","05/30/03","06/0 7/03","06/14/03")) Leafminers<-c(0,2,5,10,4,6,5) Diglyphus<-c(0,0,4,5,7,3,1) LeafDig<-cbind(Week,Leafminers,Diglyphus)
2001 Aug 13
3
subset syntax
Can anyone tell me what's wrong with this command?? xx<-subset(x,LOCAL.NAME==c("Chifumbata","Chikota"),select=c(13,16,19,23,26,2 9,30,33:48)) Warning message: longer object length is not a multiple of shorter object length in: LOCAL.NAME == c("Chifumbata", "Chikota") both of the following commands work fine
2002 Jan 08
6
Subsets without NA
Is there a way of removing all rows with missing values from a data frame? I usually use subset(x, var1!="NA") and repeat for each variable. It would be nice to be able to do it in one fell swoop. Also, surprisingly, it doesn't always work. Sometimes I'm left with an empty set even though not all rows have missing values for the variable. Cheers, mikkel Mikkel Grum,
2001 Aug 09
1
Mixed mode import problem
First question: I have an Excel file with both character and numeric variables that I want to import to a data.frame, so I've saved the data to a tab-delimited text file. read.table : * Won't identify the mode of my character variables, as some of them contain only numbers and none of them are surrounded by quotes, * Won't allow me to specify the mode of my variables, * Doesn't
2003 Jan 07
2
Extracting means for given strata from dissimilarity object
Is there a way of extracting mean distance or dissimilarity for a given strata from a 'dist' or 'dissimilarity' object, e.g. extract mean distances for each species in Anderson's iris data? data(iris) iris.dist<-dist(iris[,1:4]) then what? Mikkel Grum, PhD Genetic Diversity Scientist International Plant Genetic Resources Institute (IPGRI) Sub-Saharan Africa Group ***
2002 Jan 08
3
colour coding and different point types in a plot
I'm trying to plot four different sorghum types on a plot using a different colour/symbol combination for each sorghum type (TYPBOTA in the script below). What am I doing wrong?: plot(xx$LATITUDE,xx$SFD1, points(xx$SFD1,xx$LATITUDE, col=1:4[codes(xx$TYPBOTA)],pch=c(4,3,1,2)[codes(xx$TYPBOTA)]) grid() I get the following error message Error in 1:4[codes(xx$TYPBOTA)] : NA/NaN argument
2001 Aug 21
4
looking for a smarter way
I have two problems where I've come up with some code that will do the analysis that I want, but it looks pretty clumsy. In the first case, I calculate the variance on five different columns for each of 14 clusters and get them into one matrix. I get the job done, but I would have thought that it could be done in one or two lines, not six, and be generalized so that it didn't matter how
2003 Aug 04
1
hclust() and agnes() method="average" divergence (PR#3648)
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C35A53.75780090 Content-Type: text/plain; charset="iso-8859-1" Anyone have a clue why hclust() and agnes() produce different results in the example below when both use method="average"?? I'm not able to reproduce
2002 May 15
0
RE: cut.dendrogram (PR#1552)
>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes: >>>>> "MikG" == M GRUM <M.GRUM@CGIAR.ORG> writes: MikG> I'm resending this bug report with a new example. As MikG> seen below, cut.dendrogram gives an error message for MikG> some heights, but not for others and with some MikG> datasets
2002 May 14
0
RE: cut.dendrogram (PR#1552)
>>>>> "MikG" == M GRUM <M.GRUM@CGIAR.ORG> writes: MikG> I'm resending this bug report with a new example. As MikG> seen below, cut.dendrogram gives an error message for MikG> some heights, but not for others and with some MikG> datasets adn not others. I can't see why. MikG> Last time I unwittingly sent my message with
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
2002 Apr 29
2
cluster analyses
I'm clustering rather large data sets and would like to cut the dendrograms to get a better view of specific components. I calculate the dissimilarity matrix using daisy() because I have a mixture of variable types: factors, ordered factors and numerical variables. If I want one dendrogram, I use agnes() for the agglomerative nesting and pltree() to draw the dendrogram. That way, I get the
2003 Sep 24
5
splitting clusters
Hi All: I am clustering 500 genes using hclust of R. Visualizing cluster membership becomes difficult with so many genes in each cluster...Is there a way of printing the dendrogram in multiple pages so that I can clearly see what is in each cluster? Thanks in advance. Karthi.
2002 May 14
0
RE: cut.dendrogram (PR#1552)
I'm resending this bug report with a new example. As seen below, cut.dendrogram gives an error message for some heights, but not for others and with some datasets adn not others. I can't see why. Last time I unwittingly sent my message with HTML formatting. This time I'm travelling and using an e-mail system that I am unfamiliar with. As far as I can see, I am not using HTML.
2001 Jul 20
4
plotting dendrograms
Hello, Can anyone offer any insight on graphing classification dendrograms with the nodes marked? plot(tree()) produces a nice tree structure but there's no acccompanying text. Thanks, D S. David White sdavidwhite at bigfoot.com Columbus, Ohio -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2012 Aug 12
0
Different cluster orderings from cutree() and cut.dendrogram()
Hi! I just discovered that cutree() and cut.dendrogram() do not assign the same cluster numberings when called on the same tree. More specifically, cutree() assigns cluster numbers by order of appearance in the data, while cut.dendrogram() sorts clusters by height (see example below). I guess this is for historical reasons? I'm hit by this difference when I want to get a vector of cluster
2007 Oct 26
2
cut.dendrogram and cutree
Hi! In the example: hc <- hclust(dist(USArrests), "ave") dend1 <- as.dendrogram(hc) dend2 <- cut(dend1, h=70) Do the branches "Branch 1", "Branch 2", "Branch 2"...in dend2$upper str(dend2$upper) --[dendrogram w/ 2 branches and 4 members at h = 152] |--[dendrogram w/ 2 branches and 2 members at h = 77.6] | |--leaf "Branch 1" (h=
2003 Dec 11
1
cutree with agnes
Hi, this is rather a (presumed) bug report than a question because I can solve my personal statistical problem by working with hclust instead of agnes. I have done a complete linkage clustering on a dist object dm with 30 objects with agnes (R 1.8.0 on RedHat) and I want to obtain the partition that results from a cut at height=0.4. I run > cl1a <- agnes(dm, method="complete")
2003 Dec 11
1
cutree with agnes
Hi, this is rather a (presumed) bug report than a question because I can solve my personal statistical problem by working with hclust instead of agnes. I have done a complete linkage clustering on a dist object dm with 30 objects with agnes (R 1.8.0 on RedHat) and I want to obtain the partition that results from a cut at height=0.4. I run > cl1a <- agnes(dm, method="complete")