Skip to contents

Convert an object to a pf object

Usage

pf_as_pf(x, ...)

Arguments

x

An object to convert

...

Other arguments pass to or from other methods.

Value

a pf object with branch lengths as features

Examples

pf_as_pf(ape::rtree(100))
#> # A tibble: 198 × 3
#>    label is_tip phlo                                                            
#>    <chr> <lgl>  <pfc>                                                           
#>  1 t88   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No── 0.87──→ Node6 ── 0.18──→ t88 
#>  2 t39   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No── 1.00──→ Node8 ── 0.96──→ t39 
#>  3 t25   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No── 1.00──→ Node8 ── 0.14──→ t25 
#>  4 t3    TRUE   ◎──0.832──→ Node2 ──0.845──→ No──0.063──→ Node9 ──0.242──→ t3 
#>  5 t87   TRUE   ◎──0.832──→ Node2 ──0.845──→ No──0.063──→ Node9 ──0.922──→ t87 
#>  6 t19   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No 0.42──→ Node10 ── 0.35──→ t19 
#>  7 t45   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No 0.48──→ Node13 ── 0.76──→ t45 
#>  8 t15   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No 0.48──→ Node13 ── 0.91──→ t15 
#>  9 t63   TRUE   ◎──0.832──→ Node2 ──0.845──→ No0.688──→ Node12 ──0.037──→ t63 
#> 10 t24   TRUE   ◎── 0.83──→ Node2 ── 0.84──→ No 0.53──→ Node14 ── 0.89──→ t24 
#> # ℹ 188 more rows