Description Usage Arguments Details Value Examples
View source: R/f0.rbsb1.code.r
from a conveniently tagged character vector, returns nested lists.
Most often such a character is obtained by reading a file with the
function file2char
, this explains why it is convenient to
speak about 'lines' rather about 'components of the character
vector'.
All lists are named lists and the tags give the names of
their component. The maximum number of nested levels of lists is
given by the number of rows of the matrix tags
. The
corresponding two columns give the opening and closing sequence of
the tags. Final lists contain character
vectors, each
component of them being on the same line and/or on the following line
(before a new tag).
All tags must start at the very beginning of a
line. All separator tags must be used sticked to the list tag.
1 2 |
chara |
character vector to be transformed into a list. |
tags |
Character matrix with two columns indicating the opening and closing tags of the lists at different levels. Its row numbers gives the maximum number of levels. Opening tags must be different. |
sep |
Character sequence used to split the character vectors of
every line. Notice that |
rsep |
Indicates if repetitions of |
stag |
Two character strings indicating the tag to define
different |
It is compulsory to tag each level of the lists, this implies that
when starting a new list, a character vma (see char2vma
for
the details: vma means vector or matrix or array) is provided meaning
that this is the final level for this branch, or a new sublist is
started with the corresponding tag, or a new component of the list is
given at a level less or equal to the present.
Separator between
different character component is given by the sep
argument or
indicated by the separator tag (stag
), in the last case, it
can be different from a leaf list to another.
Be aware that before
reading a line for a character translation, all starting and ending
spaces are eliminated.
a list [of lists [of lists [...] ] ] of character (possibly named) vectors or matrices or arrays.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.