[R] combinations without repetition

mjenny@rumms.uni-mannheim.de mjenny at rumms.uni-mannheim.de
Sun Feb 13 15:45:11 CET 2005


The solution is probably simple but I need someone to point me to it.
How can I reduce the following 6 permutations to the 3 unique combinations
(1,1,0) (1,0,1) (0,1,1)?

permn(c(1,1,0))
[[1]]
[1] 1 1 0

[[2]]
[1] 1 0 1

[[3]]
[1] 0 1 1

[[4]]
[1] 0 1 1

[[5]]
[1] 1 0 1

[[6]]
[1] 1 1 0

Thanks a lot
Marcelo Jenny




More information about the R-help mailing list