Description Usage Arguments Value Examples
Create a function returning a constant value
1 |
v |
Constant value to be returned by the function |
A function returning a vector with constant value v and length equal to the input vector
1 2 3 | fun = constant_function_factory(0)
# all values are TRUE
print(fun(1:10) == rep(0, 10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.