Description Usage Arguments Value Note Examples
View source: R/package_maintenance.R
Translates a nested list (as provided by a yaml file) into R code defining the lists
1 | listToRCode(obj, indent = " ", indentShift = "")
|
obj |
list; Nested list to be translated. The allowed list elements are: list, character, numeric, logical |
indent |
character (optional) (default: ' '[4 whitespaces]); Character(s) used for the indentation. Default: <tab> |
indentShift |
character (optional) (default: ”); Shifts the block to the right by putting the characters before each line (mostly used in internal recursion) |
character; R code for generating the nested list
only for package maintenance!
1 2 3 4 5 6 7 8 9 10 11 12 13 | test = list(bla='some text',blubb=list(a='more text', version='2.0'),justANumber=123456)
#$bla
#[1] "some text"
#$blubb
#$blubb$a
#[1] "more text"
#$blubb$version
#[1] "2.0"
#$justANumber
#[1] 123456
#
#listToRCode(test)
#[1] "list(\n\tbla=\"some text\",\n\tblubb=list(\n\t\ta=\"more text\",\n\t\tversion=\"2.0\"\n\t)\n)"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.