Skip to contents

list parentless nodes in ontology_index instance

Usage

onto_roots(x)

Arguments

x

an ontology_index instance

Value

a report (produced by cat()) of root ids and associated names

Examples

onto_roots
#> function (x) 
#> {
#>     roots = x$id[sapply(x$parents, length) == 0]
#>     show_roots <- roots[order(sapply(x$children[roots], length), 
#>         decreasing = TRUE)]
#>     cat(paste0(collapse = "", "\t", show_roots, " - ", x$name[show_roots], 
#>         "\n"), sep = "")
#> }
#> <bytecode: 0x1782630a8>
#> <environment: namespace:ontoProc>