> choose (5,2) > binom.test(10, 12, 0.5, alternative="two.sided") > pascalTri <- function(h) { lapply(0:h, function(i) choose(i, 0:i)) } > pascalTri(5)
> install.packages('gtools') > library(gtools) > balls <- c('red', 'blue', 'black') > permutations(n=3,r=2,v=balls) > bags <- c('green', 'red', 'blue', 'black') > permutations(n=4, r=3, v=bags, repeats.allowed=T)