from_igraph: Convert igraph to population

Description Usage Arguments Value Examples

View source: R/igraph.R

Description

Convert igraph to population

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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))

malan documentation built on July 2, 2020, 3:01 a.m.