https://github.com/cran/pracma
Tip revision: 579123307d89d9c83ce74568d6dfb56864019c93 authored by Hans W. Borchers on 05 February 2014, 00:00:00 UTC
version 1.6.4
version 1.6.4
Tip revision: 5791233
perms.R
##
## p e r m s . R Test Suite
##
perms <- pracma::perms
randperm <- pracma::randperm
identical(perms(2), matrix(2, 1, 1))
identical(perms(c(1, 2)), matrix(c(2, 1, 1, 2), 2, 2))
identical(nrow(perms(1:6)), 720L)
all(c(1,2,3) %in% randperm(c(1,2,3)))