CallbackParam-class | R Documentation |
This class represents a parameter whose value is obtained by evaluating a function.
CallbackParam(callback, dim = NULL, ...) ## S4 method for signature 'CallbackParam' value(object)
callback |
A callback function that generates the parameter value. |
dim |
The dimensions of the parameter. |
... |
Additional attribute arguments. See Leaf for details. |
object |
A CallbackParam object. |
callback
A callback function that generates the parameter value.
dim
The dimensions of the parameter.
x <- Variable(2) fun <- function() { value(x) } y <- CallbackParam(fun, dim(x), nonneg = TRUE) get_data(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.