from_igraph {malan} | R Documentation |
Convert igraph to population
Description
Convert igraph to population
Usage
from_igraph(x, ...)
Arguments
x |
igraph, must be a forest of directed trees with unique positive integer names (as they will be pid's) |
... |
Ignored |
Value
A population
Examples
g <- igraph::graph_from_literal( 2 +- 1 -+ 3, 4 -+ 5 )
plot(g)
pop <- from_igraph(g)
peds <- build_pedigrees(pop, progress = FALSE)
plot(peds)
infer_generations(peds)
get_generation(get_individual(pop, 1))
get_generation(get_individual(pop, 2))
get_generation(get_individual(pop, 3))
get_generation(get_individual(pop, 4))
get_generation(get_individual(pop, 5))
[Package malan version 1.0.3 Index]