I have this custom function to show the combinations:
x<-function(a,b){
ncol(combn(a,b))
}
combinations<-numeric()
for(i in 0:12){
combinations<-c(combinations,x(12,i))
}
combinations
It works, but I want to know if it's possible to do something simpler, like this:
x<-function(a,b){
ncol(combn(a,b))
}
x(12,0:12)