XinMeng <xmeng <at> capitalbio.com> writes:
>
> Hi all:
> As to hcluster,how can I control the cluster is performed according to
rows(genes for instance) or> columns(samples for instance)?
> I can't find the parameters for it.
>
Function hclust (if that was intended with 'hcluster') needs a
dissimilarity
matrix as an argument. If those dissimilarities are between rows, you will get
clustering of rows ("samples"). If you dissimiarities are between
columns
("variables") then you will get a clustering of columns. Technically
this is,
easy. If d <- dist(x) gives you Euclidean distances between rows, then d
<-
dist(t(x)) gives you Euclidean distances between columns (function t()
transposes its argument). In practice, the problem is that you need to find a
dissimilarity measure that is meaningful for columns. Such dissimilarity
measures are rare, but there may be some alternatives floating around in R.
cheers, Jari Oksanen