Replace feature with edge index in a pfc
pf_indexes.Rd
This is similar to base R's col()
function, it returns a pfc
with features
that are just the index of the edge. Useful for complex indexing procedures
Value
A new pfc
with the same structure as x
, but with
the features of each edge equal to the edge index (the column number in the
sparse matrix representation)
Examples
pf_indexes(rpfc(100))
#> <pfc<e:198>[198]>
#> First 10 phylogenetic flows:
#> [1] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 8──→ t68
#>
#> [2] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 10──→ Node67 ── 12──→ t71
#>
#> [3] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 10──→ Node67 ── 11──→ t14
#>
#> [4] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 14──→ Node63 ── 16──→ Node66 ── 18──→ Node70 ── 20──→ t87
#>
#> [5] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 14──→ Node63 ── 16──→ Node66 ── 18──→ Node70 ── 19──→ t20
#>
#> [6] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 14──→ Node63 ── 16──→ Node66 ── 17──→ t6
#>
#> [7] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 14──→ Node63 ── 15──→ t75
#>
#> [8] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 13──→ Node73 ── 22──→ Node90 ── 24──→ t92
#>
#> [9] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 13──→ Node73 ── 22──→ Node90 ── 23──→ t80
#>
#> [10] ◎── 2──→ Node2 ── 4──→ Node4 ── 6──→ Node27 ── 7──→ Node31 ── 9──→ Node36 ── 13──→ Node73 ── 21──→ t18