compose | R Documentation |
compose functions passed to ...
compose(...)
... |
functions to be composed |
add2 <- function(x) x+2
mul2 <- function(x) x*2
f = compose(add2, mul2)
g = compose(mul2, add2)
f(1:3)
g(1:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.