R/permutateX.R

Defines functions permutateX

permutateX <- function(X) {
  N <- sum(X)
  K <- length(X)
  perm_x <- as.vector(unname(table(sample(K, size = N, replace = TRUE))))
  return(perm_x)
}

Try the permChacko package in your browser

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

permChacko documentation built on May 29, 2024, 2:14 a.m.