R/permWithin.R

Defines functions permWithin

Documented in permWithin

permWithin <- function(G) {
n <- length(G)
splind <- split(1:n,f=G)
ipl  <- lapply(splind,sample)
unsplit(ipl,G)
}

Try the kanova package in your browser

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

kanova documentation built on Aug. 8, 2025, 7:50 p.m.