R/permute.rows.R

Defines functions permute.rows

permute.rows <- function (x){
    dd <- dim(x)
    n <- dd[1]
    p <- dd[2]
    mm <- runif(length(x)) + rep(seq(n) * 10, rep(p, n))
    matrix(t(x)[order(mm)], n, p, byrow = TRUE)
}

Try the rda package in your browser

Any scripts or data that you put into this service are public.

rda documentation built on July 22, 2018, 1:01 a.m.