https://github.com/cran/pracma
Raw File
Tip revision: 708a2ad382a163d1eef5af0665e3ae2aad200ced authored by HwB on 21 March 2013, 00:00:00 UTC
version 1.4.5
Tip revision: 708a2ad
combs.R
##
##  c o m b s . R  Test Suite
##

combs <- pracma::combs
randcomb <- pracma::randcomb

identical(combs(2, 1), 2)
identical(combs(c(1, 2, 3), 2), matrix(rep(c(1, 2, 3), each = 2), 3, 2))
identical(nrow(combs(1:6, 4)), 15L)

all(c(1,2,3) %in% randcomb(c(1,2,3), 3))
back to top