trvssubinq {VBTree} | R Documentation |
Using sub vector binary tree to visit the traversal table
Description
Visit the traversal table generated from a vector binary tree through the sub vector binary tree determined by the argument inq
, and
return an inquiry list containing the numeric index, the character pattern and the corresponding coordinate for each item.
Usage
trvssubinq(trvs, inq)
Arguments
trvs |
The traversal table to be visited, which should be generated from the vector binary tree by the function trvs(). |
inq |
A sub tree generated from the original vector binary tree, to determine the subset of elements to be visited. |
Value
Return a list containing the numeric index, the character pattern and the corresponding coordinate for each item.
See Also
Examples
#Make original vector binary tree and its traversal table:
vbt <- dl2vbt(chrvec2dl(colnames(datatest)))
trav <- trvs(vbt)
#Visit all elements defined by sub vector binary tree:
#example 1: visit all "Stress-*-*-*" patterns;
#make sub vector binary tree through vbtsub() then execute inquiry:
subvbt <- vbtsub(vbt, c(2,-1,-1,-1))
trvssubinq(trav, subvbt)
#example 2: visit all "Strain-("950", "1050")-("0.001", "0.1")-*" patterns;
#make sub vector binary tree through advbtsub() then execute inquiry:
subvbt <- advbtsub(vbt, list(1, c(2,4), c(1,3), 1))
trvssubinq(trav, subvbt)
[Package VBTree version 0.1.1 Index]