dl2vbt {VBTree} | R Documentation |
Convert a double list to vector binary tree
Description
Convert a double list to vector binary tree. The pure numeric layers will be sorted intrinsically then all elements be exported in character form.
Usage
dl2vbt(x, regularize = TRUE, splt = "-")
Arguments
x |
A double list to be converted. |
regularize |
A boolean value to control the treatment of empty layers of double listed to be converted.
The default value |
splt |
A string pattern to split the binding elements in each layer if the sub-constructure exists. The default pattern uses "-". |
Value
Return a vector binary tree.
See Also
vbtinq
, vbtsub
, advbtinq
,
advbtsub
, trvssubinq
, dl2ts
,
dl2arr
.
Examples
#Structurize the column names of datatest:
colname <- colnames(datatest)
colnamedl <- chrvec2dl(colname, "-")
colnamevbt <- dl2vbt(colnamedl)
#Simple data cleaning for sub-constructure existing double list;
#Make unregulated double list:
unregdl <- list(c("7", 2, 10), c("chr", "5"), c(),
c("var2", "var1", "var3"), c("M-8-9", "3-2"), c("6-3", "2-7"))
regvbt <- dl2vbt(unregdl)
regvbt2 <- dl2vbt(unregdl, FALSE) # not recommended
[Package VBTree version 0.1.1 Index]