ts2vbt: Convert a structured character tensor to double list

View source: R/tsCvrt.R

ts2vbtR Documentation

Convert a structured character tensor to double list

Description

Convert a structured character tensor to a vector binary tree. All character elements in tensor will be splited by a specific pattern then sorted intrinsically in each layer of the vector binary tree.

Usage

ts2vbt(x, ...)

Arguments

x

A structured character tensor to be converted.

...

Argument in chrvec2dl to control split pattern.

Value

Return a vector binary tree based on the input tensor.

See Also

ts2dl, chrvec2dl.

Examples

#Write the column names of datatest into a tensor:
ts <- dl2ts(chrvec2dl(colnames(datatest)))

#Recover the vector binary tree from character tensor:
ts2vbt(ts)

CubicZebra/VBTree documentation built on Feb. 3, 2024, 3:42 p.m.