Description Usage Arguments Details Value Author(s) See Also Examples
Build a possibly nested list using the result of a function.
1 | listBuilder(x,FUN=NULL,fargs=NULL)
|
x |
The object that will be the first argument of FUN, or a possibly nested list of such objects. |
FUN |
A function that can accept x as its first argument. |
fargs |
A list of the remaining arguments to FUN. |
listBuilder descends the list structure of x if it is a list until it encounters a non-list element. It then passes that element as the first argument to FUN and returns the value of FUN. This may be a list of elements, replacing the original element, hence the name.
If x is not a list and FUN is NULL, x is returned. If FUN creates a list from one or more elements of x, a list or nested list will be returned. Successive calls to listBuilder can rapidly create very large, deeply nested list structures.
Jim Lemon
list
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.