Skip to contents

Get children and siblings of tree entries and chunks.

Usage

getChildrenOfEntry(treeEntry, treeEntryDF)

getChildrenOfChunk(chunkID, chunkDF, treeEntryDF)

getChildrenOfChunkIf(chunkID, chunkDF, treeEntryDF, cond = expr(TRUE))

getSiblingsOfEntry(treeEntry, treeEntryDF)

getSiblingsOfChunk(chunkID, chunkDF, treeEntryDF)

getSiblingOfChunkIf(chunkID, chunkDF, treeEntryDF, cond = expr(TRUE))

Arguments

treeEntry

A treeEntry ID.

treeEntryDF

A treeEntryDF from a rezrObj. Must be a rezrDF, not a list; combineLayers() can be used to combine multiple rezrDFs.

chunkID

A chunk ID.

chunkDF

A chunkDFfrom a rezrObj, Must be a rezrDF, not a list; combineChunks() or combineTokenChunk() can be used to combine multiple rezrDFs. You must have run getAllTreeCorrespondences() on it beforehand, i.e. a treeEntry column must exist. Also, both parents and children (for child-related functions) and all relevant siblings (for sibling-related functions) must reside in the chunkDF.

cond

A condition using columns from the chunkDF.

Value

A list of IDs of siblings or children

Examples

sbc007 = getAllTreeCorrespondences(sbc007, "chunk")
#> There is more than one tree entry match for the token 37EFCBECFD691. I will take the first match.
#> There is more than one tree entry match for the token 12D67756890C1. I will take the first match.
#> There is more than one tree entry match for the token 152560A5DE6AC. I will take the first match.
#> There is more than one tree entry match for the chunk 210FB26A315A. I will take the first match.
#> There is more than one tree entry match for the chunk 22273255D825D. I will take the first match.
getSiblingsOfChunk("33EAD4C986974", sbc007$chunkDF$refexpr, sbc007$treeEntryDF$default)
#> [1] "1FD903B61D735"
getChildrenOfChunk("13AACBE0BB38A", combineTokenChunk(sbc007), sbc007$treeEntryDF$default)
#> [1] "1B80DC120746A"