Return node ids for connecting id
to root.
Examples
tree <- randTree(10)
getNdsPrids(tree, ids = tree["tips"])
#> $t1
#> [1] "n8" "n2" "n1"
#>
#> $t10
#> [1] "n4" "n3" "n2" "n1"
#>
#> $t2
#> [1] "n7" "n3" "n2" "n1"
#>
#> $t3
#> [1] "n9" "n7" "n3" "n2" "n1"
#>
#> $t4
#> [1] "n9" "n7" "n3" "n2" "n1"
#>
#> $t5
#> [1] "n6" "n5" "n1"
#>
#> $t6
#> [1] "n6" "n5" "n1"
#>
#> $t7
#> [1] "n8" "n2" "n1"
#>
#> $t8
#> [1] "n4" "n3" "n2" "n1"
#>
#> $t9
#> [1] "n5" "n1"
#>