https://github.com/cran/pracma
Raw File
Tip revision: 00dcc24912cb9162914b67ae18137cab456a0b21 authored by Hans W. Borchers on 06 September 2016, 16:40:55 UTC
version 1.9.5
Tip revision: 00dcc24
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