Get children and siblings of tree entries and chunks.
chunkfam.Rd
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 arezrObj
. Must be arezrDF
, not a list;combineLayers()
can be used to combine multiplerezrDF
s.- chunkID
A chunk ID.
- chunkDF
A
chunkDF
from arezrObj
, Must be arezrDF
, not a list;combineChunks()
orcombineTokenChunk()
can be used to combine multiplerezrDF
s. You must have rungetAllTreeCorrespondences()
on it beforehand, i.e. atreeEntry
column must exist. Also, both parents and children (for child-related functions) and all relevant siblings (for sibling-related functions) must reside in thechunkDF
.- cond
A condition using columns from the
chunkDF
.
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"