Calcualte the number of possible permutations for a vector of length n taking k at a time

n_perm(n, k)

Arguments

n

length of vector

k

number of values to take at a time

Value

a numeric value or vector if input values are a vector of vectors

Examples

n_perm(10, 2)
#> [1] 90
n_perm(3, 4)
#> [1] 0