I am sure it is out there but for my record keeping purposes and for anyone interested here is a quick function to find Stirling’s approximation of all possible permutations

Stirling<- function (n)((2*pi*n)^.5)*(n/exp(1))^n

Created by Pretty R at inside-R.org

### Like this:

Like Loading...

*Related*

## About Philip Parker

I am a post doc in developmental and educational psychology at a Germany university. I did my PhD at the university of Sydney in stress and well-being. Most days I am hunched over a computer yelling at statistical software or responding to journal editors who seem to always want twice the amount of content but with half the words. For fun I like to read up on the latest developments in R and programming various functions.

Thank you! I’ve been looking for this for a while.