| HierarchyResource | R Documentation |
R6 class providing access to hierarchy operations (ancestors and descendants).
For flat format: ancestors, descendants arrays with level/total counts. For graph format: nodes and edges arrays for visualization.
Ancestors with hierarchy summary.
Descendants with hierarchy summary.
new()Create a new HierarchyResource.
HierarchyResource$new(base_req)
base_reqBase httr2 request object.
get()Get complete concept hierarchy (ancestors and descendants).
HierarchyResource$get( concept_id, format = "flat", vocabulary_ids = NULL, domain_ids = NULL, max_levels = 10, max_results = NULL, relationship_types = NULL, include_invalid = FALSE )
concept_idThe concept ID.
formatResponse format - "flat" (default) or "graph" for visualization.
vocabulary_idsFilter to specific vocabularies (character vector).
domain_idsFilter to specific domains (character vector).
max_levelsMaximum hierarchy levels to traverse in both directions (default 10).
max_resultsMaximum results per direction for performance optimization.
relationship_typesRelationship types to follow (default: "Is a").
include_invalidInclude deprecated/invalid concepts. Default FALSE.
ancestors()Get concept ancestors.
HierarchyResource$ancestors( concept_id, vocabulary_ids = NULL, max_levels = NULL, relationship_types = NULL, include_paths = FALSE, include_distance = TRUE, include_invalid = FALSE, page = 1, page_size = 100 )
concept_idThe concept ID.
vocabulary_idsFilter to specific vocabularies (character vector).
max_levelsMaximum hierarchy levels to traverse.
relationship_typesRelationship types to follow (default: "Is a").
include_pathsInclude path information. Default FALSE.
include_distanceInclude distance from source. Default TRUE.
include_invalidInclude deprecated/invalid concepts. Default FALSE.
pagePage number. Default 1.
page_sizeResults per page. Default 100.
descendants()Get concept descendants.
HierarchyResource$descendants( concept_id, vocabulary_ids = NULL, max_levels = 10, relationship_types = NULL, include_distance = TRUE, include_paths = FALSE, include_invalid = FALSE, domain_ids = NULL, page = 1, page_size = 100 )
concept_idThe concept ID.
vocabulary_idsFilter to specific vocabularies (character vector).
max_levelsMaximum hierarchy levels (default 10, max 20).
relationship_typesRelationship types to follow.
include_distanceInclude distance from source. Default TRUE.
include_pathsInclude path information. Default FALSE.
include_invalidInclude deprecated/invalid concepts. Default FALSE.
domain_idsFilter by domains.
pagePage number. Default 1.
page_sizeResults per page. Default 100.
print()Print resource information.
HierarchyResource$print()
clone()The objects of this class are cloneable with this method.
HierarchyResource$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.