Description Usage Arguments Value Examples
The conditions are evaluated only once thus cond() should NOT have side effects.
1 | iterator_atomic_cond(x, cond)
|
x |
an atomic vector |
cond |
a conditional function, must be vectorised. |
an iterator
1 2 3 4 5 6 | x <- runif(n = 10)
f <- function(a) a < 0.8
itr1 <- iterator_atomic(x)
itr2 <- iterator_atomic_cond(x, f)
collect(itr1)
collect(itr2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.