R/combmat.R

combmat <-function (n, limit = NULL) {


if (is.null(limit)) {
	limit <- n
}
    
limit <- min(limit, n)
m <- NULL
        
for (i in 1:limit) {
	tmp <- fillcomb(combn(n, i))
        m <- rbind(m, tmp)
}
    
colnames(m)<-paste("C",1:n,sep="")

m
}

Try the abctools package in your browser

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

abctools documentation built on Sept. 18, 2023, 5:14 p.m.