Description Usage Arguments Value Examples
Suppose you want to set up a list where several consecutive elements take the same value, but you don't want to repeatedly type that value: then use dittolist
to set empty (missing) elements to the previous non-empty element. Wrap in unlist()
to create a vector instead of a list.
1 2 3 | ditto.list(...)
# EG:
# ditto.list( a=1, b=, c='hello') # a: 1; b: 1, c: 'hello'
|
... |
anything, named or unnamed; missing elements OK |
List
1 | unlist( ditto.list( a=1, b=, c='hello')) # a: 1; b: 1, c: 'hello'
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.