tests/permutation.R

library(orca)
data(usastates)
n <- max(usastates)
p <- sample(1:n)
usastates.p <- apply(usastates, c(1,2), function(x) p[x])

o <- count5(usastates)
op <- count5(usastates.p)
all(o == op[p,])

e <- ecount5(usastates)
ep <- ecount5(usastates.p)
all(e == ep)

Try the orca package in your browser

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

orca documentation built on May 2, 2019, 7:03 a.m.