Skip to contents

Replace feature with edge position in flow in a pfc

Usage

pf_position(x)

Arguments

x

A pfc object

Value

A new pfc with the same structure as x, but with the features of each edge equal to the position along the flow as an integer index

Examples

pf_position(rpfc(100))
#> <pfc<e:198>[198]>
#> First  10 phylogenetic flows: 
#> [1] ◎──    1──→ Node22 ──    2──→ Node69 ──    3──→ t88 
#> 
#> [2] ◎──    1──→ Node22 ──    2──→ Node69 ──    3──→ t44 
#> 
#> [3] ◎──    1──→ Node22 ──    2──→ Node51 ──    3──→ t82 
#> 
#> [4] ◎──    1──→ Node22 ──    2──→ Node51 ──    3──→ t48 
#> 
#> [5] ◎──    1──→ Node2 ──    2──→ Node3 ──    3──→ t96 
#> 
#> [6] ◎──    1──→ Node2 ──    2──→ Node3 ──    3──→ Node4 ──    4──→ Node6 ──    5──→ Node7 ──    6──→ Node26 ──    7──→ t45 
#> 
#> [7] ◎──    1──→ Node2 ──    2──→ Node3 ──    3──→ Node4 ──    4──→ Node6 ──    5──→ Node7 ──    6──→ Node26 ──    7──→ Node45 ──    8──→ t71 
#> 
#> [8] ◎──    1──→ Node2 ──    2──→ Node3 ──    3──→ Node4 ──    4──→ Node6 ──    5──→ Node7 ──    6──→ Node26 ──    7──→ Node45 ──    8──→ Node52 ──    9──→ t31 
#> 
#> [9] ◎──    1──→ Node2 ──    2──→ Node3 ──    3──→ Node4 ──    4──→ Node6 ──    5──→ Node7 ──    6──→ Node26 ──    7──→ Node45 ──    8──→ Node52 ──    9──→ t94 
#> 
#> [10] ◎──    1──→ Node2 ──    2──→ Node3 ──    3──→ Node4 ──    4──→ Node6 ──    5──→ Node7 ──    6──→ Node24 ──    7──→ Node36 ──    8──→ t72