Skip to contents

Get a lineage's descendants out of a fromDFtoNetwork()node network. Vector being TRUE supersedes table being TRUE. Default return node network. Nodes not found result in NULL, empty string, or empty df of levelName/level/attribute depending on output being network/vector/table

Usage

getDescendants(
  x,
  node_name,
  table = FALSE,
  vector = FALSE,
  attribute = "lineage"
)

Arguments

x

node network produce by fromDFtoNetwork()

node_name

Lineage of interest ie. "BA.1"

table

logical, return tree as dataframe of level/lineage

vector

logical, return vector of lineage names

attribute

character, metadata attribute to use for table/vector output, use "name" for levelName

Value

one of three options depending on table/vector params

  • a Node class network object of the nodes beneath node_name

  • a table from the node network with level and lineage names

  • a vector of lineage/node names