Description Usage Arguments Value Examples
Constructs an iterator that returns an iterable object
before padding
the iterator with the given fill
value indefinitely.
1 |
object |
an iterable object |
fill |
the value to pad the indefinite iterator after the initial
|
iterator that returns object
followed indefinitely by the
fill
value
1 2 3 4 5 6 7 8 9 10 11 | it <- iterators::iter(1:9)
it_ipad <- ipad(it)
as.list(islice(it_ipad, end=9)) # Same as as.list(1:9)
it2 <- iterators::iter(1:9)
it2_ipad <- ipad(it2)
as.list(islice(it2_ipad, end=10)) # Same as as.list(c(1:9, NA))
it3 <- iterators::iter(1:9)
it3_ipad <- ipad(it3, fill=TRUE)
as.list(islice(it3_ipad, end=10)) # Same as as.list(c(1:9, TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.