# NOT RUN {
ltr <- c("a", "b", "c", "d")
x <- permute(ltr)
print(x)
stopifnot(nrow(x) == factorial(length(ltr)))
ltr <- c("a", "b", "b")
x <- permute(ltr)
print(x)
stopifnot(nrow(x) == factorial(length(ltr)))
# }
Run the code above in your browser using DataLab