The important thing with distance matrices is keeping the diagonals on the diagonal and the off diagonals maintyaining a relationship to keep the distance values consistent.  By this I mean that the objects being clustered are points in some high dimensional space.  You may want the positions of the objects to remain constant relative to each other and make the permutation be a shuffling of the object labels.  If you destroy the relationships by overpermuting you are moving these objects to new locations in the high dimensional space.
   
  that is why i suggested you use a single permutation vector for row/column permuting.
   
  Thank you.

Bill Shannon, PhD
BioRankings, LLC
Founder and President
314-704-8725
http://BioRankings.com

Associate Professor of Biostatistics in Medicine
Washington University School of Medicine
http://ilya.wustl.edu/~shannon

  

Tony Chiang <tchiang@fhcrc.org> wrote:
  You can do something like this

> m = matrix(1:144, 12, 12)
> rowRandomIndex = sample(1:12)
> colRandomIndex = sample(1:12)
> m[rowRandomIndex, colRandomIndex]

There must be more elegant ways to do this...but this should work.

Cheers,
--TC

On 3/19/07, prsmra01@uniroma2.it 
wrote:
>
> Dear All,
>
> It may sound a trivial question...but I couldn't find a simple
> solution in R: I'm working
> on all-against-all distance matrices, the values stored in these
> matrices representing
> measures of similarities between pair of proteins; these matrices can
> be considered
> representation of phylogenetic trees; I want to generate other
> matrices with the same
> randomly permuted distances....how can I shuffle these matrices ?
>
> thank you,
>
> Maria
> --
> Maria Persico, PhD. student
> http://cbm.bio.uniroma2.it/~maria/
> MINT database group
> Universita' di Tor Vergata, via della Ricerca scientifica 11
> 00133 Roma, Italy
> Tel +39 0672594315 (Supervisor's room)
> Fax +39 0672594766
> Mobile phone: +393479715662
> e-mail maria.persico@uniroma2.it
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

[[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
Bioconductor@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


	[[alternative HTML version deleted]]

