createTransitive: Create a transitive closure table for is-a relationships for...

View source: R/hierarchy.R

createTransitiveR Documentation

Create a transitive closure table for is-a relationships for faster ancestor / descendant lookups

Description

Returns a data.table containing ancestor / descendant relationships which can be used in ancestors and descendants functions

Usage

createTransitive(
  conceptIds,
  SNOMED = getSNOMED(),
  tables = c("RELATIONSHIP", "STATEDRELATIONSHIP")
)

Arguments

conceptIds

character or integer64 vector of SNOMED concept IDs for the subset of concepts to include in the transitive table.

SNOMED

environment containing a SNOMED dictionary

tables

vector of names of relationship table(s) to use; by default use both RELATIONSHIP and STATEDRELATIONSHIP

See Also

[ancestors()] and [descendants()]

Examples

SNOMED <- sampleSNOMED()

TRANSITIVE <- createTransitive('Heart failure')

Rdiagnosislist documentation built on April 4, 2025, 2:41 a.m.