R Language Counting combinations of a specified length


Example

Without replacement

choose(length(LETTERS), 5)
[1] 65780

With replacement

length(letters)^5
[1] 11881376