list2char: transforms a list into a character

Description Usage Arguments Details Value Examples

View source: R/f0.rbsb1.code.r

Description

The reverse operation of char2list. The list must be a rsbs-list, that is compying some properties : all components of the [sub-]lists must be either a list or a [named] character vector/matrix/array. The number of nested list must not be greater than the number of rows in matrix tags.
Every list component must be named.
The idea is to get a character compatible with char2list to produce back the object lili.
Some comments are added to the content of the list by the function itself and/or according to the whish of the user, this is why an escaping character is asked.

Usage

1
2
list2char(lili, tags=rbsb.tag1, stag=c("/", ";", "/"), comment="#",
	  comments=character(0))

Arguments

lili

The list structure to be transformed into a character.

tags

Character matrix with two columns indicating the opening and closing tags of the [sub]lists at different levels. Its row numbers gives the maximum accepted number of levels. Opening tags must be different.

stag

Three character strings indicating the tagging to define the separator for each character vector stag[2] between stag[1] and stag[3].

comment

At the beginning of a line, it indicates that this line must not be considered. This function will introduce its signature at the beginning of the file.

comments

Comments that the user want to be added at the beginning of the file.

Details

Also, the character strings of the structure must not comprise the rbsb.sep0 constant except when this global constant is conveniently modified. The same for rbsb.sep1.
Use is made of the general constant rbsb.mck for the checking.

Value

The resulting character.

Examples

1
2
 rbsb3k("reset");
 list2char(rbsb.lis1);

rbsb documentation built on May 31, 2017, 1:45 a.m.