list parentless nodes in ontology_index instance

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: 0x55ec79d00dd8>
#> <environment: namespace:ontoProc>