Seria isso o que vc procura?

require(gtools)
x=c("A","B","C","D", "E")
permutations(x, n=length(x), r=3, repeats.allowed=T)
permutations(x, n=length(x), r=4, repeats.allowed=T)


-- 
Diogo Ferrari
PhD Student
University of Michigan, Ann Arbor
Department of Political Science

Open Source! Use R! Use Linux!

"A vida é a arte de tirar conclusões suficientes de dados insuficientes"




On Nov 11, 2014, at 12:09 PM, Andre Oliveira <andreolsouza@yahoo.com.br> wrote:

x=c("A","B","C","D", "E")