View source: R/HelperFunctions.R
applyHook | R Documentation |
hook
is a function, apply it to val
, otherwise return val
unchangedIf hook
is a function, apply it to val
, otherwise return val
unchanged
applyHook(hook, val, ...)
hook |
(optional) function to apply to |
val |
The value to which the hook is applied (ifgiven) |
... |
optional parameters passed to the hook function (if it is a function) |
applyHook(NULL, 3) # returns 3 unchanged applyHook(function(x) 2*x, 3) # applies the function, returns 6 applyHook(`+`, 3, 1) # returns 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.