Is there an shortcut (compared to "manually" swap row vectors) for the random permutation of rows of a matrix?
"sample" does not act on the element row vectors as a whole.
True, but sample(nrow(foo)) gives you a permutation of 1:nrow(foo) that you can subscript with:
foo[sample(nrow(foo)),]
or
foo[,sample(ncol(foo))]
Baz
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
