我们如何使用r或excel或minitab来列出所有的排列组合?[重复]

问题描述 投票:0回答:1

如何使用R来列出4个数字的所有排列组合?请在这里输入图片描述

r permutation
1个回答
3
投票
> library(combinat)
> permn(letters[1:3])
[[1]]
[1] "a" "b" "c"

[[2]]
[1] "a" "c" "b"

[[3]]
[1] "c" "a" "b"

[[4]]
[1] "c" "b" "a"

[[5]]
[1] "b" "c" "a"

[[6]]
[1] "b" "a" "c"
© www.soinside.com 2019 - 2024. All rights reserved.