# NOT RUN {
x <- letters[1:5]; m <- 3
fastcombn(x, m)
combn(x, m)
combn_prim(x, m)
x <- letters[1:4]; m <- 3
fastcombn(x, m, simplify=FALSE)
combn(x, m, simplify=FALSE)
combn_prim(x, m, simplify=FALSE)
x <- 1:10; m <- 3
fastcombn(x, m, min)
combn(x, m, min)
x <- factor(letters[1:8]); m <- 5
if (require(microbenchmark)){
microbenchmark(
combn(x, m, simplify=FALSE),
combn_prim(x, m, simplify=FALSE),
fastcombn(x, m, simplify=FALSE),
times=50
)
}
# }
Run the code above in your browser using DataLab