Description Usage Arguments Value Examples
Since iterator_atomic_cond and iterator_batch_cond only supports vectorised function, this function is a simple sapply wrapper make any function compatible with them.
1 | fake_vectorise(f, ...)
|
f |
a non-vectorised function |
... |
additional arguments passed to wrapped function |
a function
1 2 3 4 | f <- function(x) length(x)
f2 <- fake_vectorise(f)
f(c(1,2,3,4)) #4
f2(c(1,2,3,4)) #[1,1,1,1]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.