Learn R Programming

VBTree (version 0.1.1)

chrvec2dl: Convert character vector to a double list

Description

Structurize a character vector to a double list. Layers in the double list will be determined by the given pattern.

Usage

chrvec2dl(x, splt = "-")

Value

return a character double list splited by defined pattern, the default pattern is "-".

Arguments

x

a character vector to be converted.

splt

a string pattern to make defination for spliting each layer of double list.

Examples

Run this code
#example using default dataset:

charvector <- colnames(datatest)
chrvec2dl(charvector, "-")

Run the code above in your browser using DataLab