make_permutations: List of permutations.

Description Usage Arguments Value See Also Examples

Description

List of permutations of given elements.

Usage

1
make_permutations(populations)

Arguments

populations

A vector (of populations for example) of length between 4 and 8.

Value

A list of different permutations of the elements of x.

See Also

four_leaves_graphs

five_leaves_graphs

six_leaves_graphs

seven_leaves_trees

eight_leaves_trees

fit_permutations_and_graphs

add_a_leaf

add_an_admixture

add_an_admixture2

Examples

1
2
3
4
5
6
7
8
9
# The number of permutations of n elements is n!. Take 0! = 1, 1! = 1, 2! = 2
# and 3! = 6 for granted. Now we can estimate e:
FOUR <- length(make_permutations(c(1, 2, 3, 4)))
FIVE <- length(make_permutations(c(1, 2, 3, 4, 5)))
SIX <- length(make_permutations(c(1, 2, 3, 4, 5, 6)))
SEVEN <- length(make_permutations(c(1, 2, 3, 4, 5, 6, 7)))
EIGHT <- length(make_permutations(c(1, 2, 3, 4, 5, 6, 7, 8)))
1/1 + 1/1 + 1/2 + 1/6 + 1/FOUR + 1/FIVE + 1/SIX + 1/SEVEN + 1/EIGHT
# Hey that was pretty close!

admixturegraph documentation built on May 2, 2019, 6:02 a.m.