-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of TJUN KIAT TEO
Sent: Tuesday, October 11, 2016 2:57 AM
To: r-help@r-project.org
Subject: [R] Hclust
For the hclust function in R, is there a predict function that would work to
tell me which cluster does a new observation belong
From: Joshua Eckman josheck...@hotmail.com
To: r-help@r-project.org r-help@r-project.org
Subject: [R] hclust/dendrogram merging
Message-ID: bay167-w1059032665f8387dd05cb26de...@phx.gbl
Content-Type: text/plain
I am working with protein blocking assays and the end result is a 2D
matrix
Joshua,
I'm not sure I understand your aim correctly, but if I do, here's my
advice: If you are able to find the clusters according to rows or
columns using clustering, you must be using some kind of a distance
matrix that encodes whether two antibodies should be in one bin for
rows, and a
I am working with protein blocking assays and the end result is a 2D matrix
describing which antibodies block the binding of other antibodies to the target
antigen.I need to group the antibodies together into bins based on their
combined profiles in both the row and column direction.I am able
Hi, dear list.
I found that hclust causes segfault in R 3.0.1, here is the code after
starting R --vanilla:
test.data - function(dim, num, seed=17) {
set.seed(seed)
matrix(rnorm(dim * num), nrow=num)
}
m - test.data(120, 45)
library(rpud) # load rpud with rpudplus
d -
Hi,
This worked:
fit - hclust(d, method=ward)
library(ape)
p - (as.phylo(fit))
write.tree(p, file=MyNewick.tre)
Cheers,
J
--
View this message in context:
http://r.789695.n4.nabble.com/Hclust-tree-to-Figtree-w-branch-lengths-tp4655990p4656057.html
Sent from the R help mailing list archive
Hi,
I'm doing hierarchical clustering, and want to export my dendrogram to a
tree-viewing/editing software. I can do this by converting the data to
Newick format (hc2Newick in ctc package), but I can't get branch lengths to
show in the resulting phylogram. I figured it might help to convert my
Sarah,
. clust_tree=hclust(as.dist(x),method=complete)
. plot(clust_tree)
this produces a dendrogram, whereas
. clust_tree=hclust(as.dist(x),method=complete)
.cut = cutree(clust_tree,k=1:5)
.plot(cut)
produces a plot with 2 dots. The dissimilarity matrix x is
On Tue, Apr 3, 2012 at 2:41 AM, vinod1 vinod.hegd...@gmail.com wrote:
Sarah,
. clust_tree=hclust(as.dist(x),method=complete)
. plot(clust_tree)
this produces a dendrogram, whereas
. clust_tree=hclust(as.dist(x),method=complete)
. cut = cutree(clust_tree,k=1:5)
.
Hi,
I have the distance matrix computed and I feed it to hclust function. The
plot function produces a dense dendrogram as well. But, the cutree function
applied does not produce the desired list.
Here is the code
x=data.frame(similarity_matrix)
colnames(x) = c(source_tags_vec)
What does does not work mean? Do you get an error message? Or a
warning? Or a result, but one that isn't what you expected?
Did you look at the results of the example in ?cutree to make sure
what the function does is what you think it should do?
hc - hclust(dist(USArrests))
I saw an example online of taking hclust dendrogram and plotting it using
ggplot2 and thought I would give it a try to see what it would look like. I
get an error when trying to use ggplot; Error: ggplot2 doesn't know how to
deal with data of class phylo. Regular plot works fine but I can't get
Good afternoon,
After cuting a hierarchical tree using cutree(), how to check correspondances
between classes and branches?
This is what we do:
srndpchc - hclust(dist(srndpc$x[1:1000,1:3]),method=ward) #creation of
hierarchical tree
plclust(srndpchc,hmin=2) #visualisation
srndpchc2 =
On Mon, Sep 12, 2011 at 4:59 AM, Laurent Fernandez Soldevila
l.fernand...@yahoo.fr wrote:
Good afternoon,
After cuting a hierarchical tree using cutree(), how to check correspondances
between classes and branches?
This is what we do:
srndpchc -
Hi, I have a microarray dataset of dimension 25000x30 and try to clustering
using hclust(). But the clustering on the rows failed due to the size:
y-hclust(dist(data),method='average')
Error: cannot allocate vector of size 1.9 Gb
I tried to increase the memory using memory.limit(size=3000),
) 798-6227 Fax: (713) 790-1275
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of array chip
Sent: Monday, March 14, 2011 4:03 PM
To: r-help@r-project.org
Subject: [R] hclust() memory issue
Hi, I have a microarray dataset of dimension
PM
Subject: RE: [R] hclust() memory issue
John,
First, why are you trying to cluster so many rows? Presumably, if this is a
gene expression array dataset, most of the array features are not going to
change across treatments/conditions and will be relatively uninformative. Try
using a filter
A sochs...@bcm.edu
r-help@r-project.org
Sent: Mon, March 14, 2011 2:19:57 PM
Subject: RE: [R] hclust() memory issue
John,
First, why are you trying to cluster so many rows? Presumably, if this is a
gene expression array dataset, most of the array features are not going to
change across
Hello everybody,
I need to know how often every element in an hierarchical cluster was
branched - just imagine a watering pot on the top of the hierarchical
tree - the leafs should get water according to the number of branches
that lie before them.
For example:
a - list() # initialize
I found the problem.
For some reason, when I converted the list object with the data in it to
numeric, the values changed. This resulted in different clustering
results. Once that was fixed, the clustering was the same.
Thanks for the responses!
On Mon, Nov 15, 2010 at 2:37 PM, Peter
Hello,
I am using the hclust function to cluster some data. I have two separate
files with the same data. The only difference is the order of the data in
the file. For some reason, when I run the two files through the hclust
function, I get two completely different results.
Does anyone know
On Mon, Nov 15, 2010 at 2:07 PM, rchowdhury rchowdh...@alumni.upenn.edu wrote:
Hello,
I am using the hclust function to cluster some data. I have two separate
files with the same data. The only difference is the order of the data in
the file. For some reason, when I run the two files
I don't know how the hclust function is implemented, but generally in
hierarchical clustering the result can be ambiguous if there are several
distances of identical value in the dataset (or identical between-cluster
distances occur when aggregating clusters). The role of the order of the
data
Here is the code I am using:
m - read.csv(data_unsorted.csv,header=TRUE)
m - na.omit(m)
cs - hclust(dist(t(m),method=euclidean),method=complete)
ds - as.dendrogram(cs)
In this case, m is a 106x40 matrix of doubles. When I change the order of
the columns, I get different results...
Thanks,
RC
On Mon, Nov 15, 2010 at 2:19 PM, Reshmi Chowdhury
rchowdh...@alumni.upenn.edu wrote:
Here is the code I am using:
m - read.csv(data_unsorted.csv,header=TRUE)
m - na.omit(m)
cs - hclust(dist(t(m),method=euclidean),method=complete)
ds - as.dendrogram(cs)
As Christian said, you may want to
On Wed, 6 Oct 2010, PeterB wrote:
Thanks, Christian. This is really helpful.
I was not aware of that equality, but now I can see it. I think you mean the
inner sum over all distances in the distance matrix (for that cluster),
which means that each distance is counted twice (which is why we
Apparently, the same issue exists in SAS, where there is an option to run the
Ward algorithm based only on the distance matrix. Perhaps, a SAS user could
confirm that or even check with SAS.
Peter
--
View this message in context:
The k-means/Ward criterion can be written down in terms of squared
Euclidean distances in a way that doesn't involve means. It is half the
sum (over all clusters) of the sum (over all observations in a
cluster) of all within-cluster squared dissimilarities, the inner sum
divided by the cluster
Thanks, Christian. This is really helpful.
I was not aware of that equality, but now I can see it. I think you mean the
inner sum over all distances in the distance matrix (for that cluster),
which means that each distance is counted twice (which is why we divide by
2).
Peter
Christian Hennig
The clustering function hclust has a method = ward”, and apparently many
people use that option. However, the Ward method seems to minimize an
increase in the error sums of squares, which are calculated with respect to
the cluster mean. However, hclust has only a dissimilarity matrix as an
input.
i try to show the result of the cluster-analysis (hclust, method=ward) in a
table with following information
first column: height
second column: number of clusters
third column: clustering information
0,041 | 20 | (3)-(5)
0,111 | 19 | (6)-(11)
0,211 | 18 |
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
On Tue, 17 Nov 2009, akonla wrote:
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
Yikes, you are correct! Thank you so much. I reran the analysis with the
rows and columns switched and it took no time at all.
Thank you again for your help.
On Tue, Nov 17, 2009 at 12:04 PM, Charles C. Berry cbe...@tajo.ucsd.eduwrote:
On Tue, 17 Nov 2009, akonla wrote:
Hi,
I am new to
Hi all,
I've been doing some investigation to see if it is possible to implement an
hclust/dendrogram related requirement that I've been given. So far ?hclust and
a lot of googling haven't provided the information I'm looking for (I've been
using R sporadically for a year).
The requirement I
-project.org
Subject: [R] hclust graphics - plotting many points
Hello.
I have a distance matrix with lots of distances that I use hclust to
organise. I then plot the results using the plot method of hclust.
However, the plot itself takes around 20 mins to make due to there
being ~700 things
Hello.
I have a distance matrix with lots of distances that I use hclust to
organise. I then plot the results using the plot method of hclust.
However, the plot itself takes around 20 mins to make due to there
being ~700 things in the matrix that I have distances for. I thus
would like to dump
I'd recommend outputting either as pdf or as a windows metafile
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Karin Lagesen
Sent: 10 March 2008 09:54
To: r-help@r-project.org
Subject: [R] hclust graphics - plotting many points
Hello.
I have
affy snp wrote:
Dear list,
I am using heatmap.2(x) to draw a heatmap. Ideally, I want to the matrix
x clustered only by columns and keep the original order of rows unchanged.
Is there a way to do that in heatmap.2()?
Thanks a lot! Any suggestions will be appreciated!
From the help
Thanks Ashoka!
Allen
On Dec 6, 2007 12:27 AM, Ashoka Polpitiya [EMAIL PROTECTED]
wrote:
Check the Rowv, Colv options to heatmap.2
data(mtcars)
x - as.matrix(mtcars)
heatmap.2(x, Rowv=FALSE, dendrogram=column)
-Ashoka
Scientist - Pacific Northwest National Lab
On Dec 5, 2007
Thanks James!
Allen
On Dec 6, 2007 9:21 AM, James W. MacDonald [EMAIL PROTECTED] wrote:
affy snp wrote:
Dear list,
I am using heatmap.2(x) to draw a heatmap. Ideally, I want to the matrix
x clustered only by columns and keep the original order of rows
unchanged.
Is there a way to
Check the Rowv, Colv options to heatmap.2
data(mtcars)
x - as.matrix(mtcars)
heatmap.2(x, Rowv=FALSE, dendrogram=column)
-Ashoka
Scientist - Pacific Northwest National Lab
On Dec 5, 2007 4:20 PM, affy snp [EMAIL PROTECTED] wrote:
Dear list,
I am using heatmap.2(x) to draw a heatmap.
42 matches
Mail list logo