Generate an Rserve app from a ts function
ts_app.RdAnything that is not a function simply returns itself.
However, functions are wrapped with Rserve::ocap(),
and the result is subsequently wrapped with ts_app().
Arguments
- x
A ts function object (
ts_function())
Value
An object of class 'OCref', see Rserve::ocap()
Examples
f <- ts_function(function(x = ts_integer(1), y = ts_character(1)) {
x + nchar(y)
}, result = ts_integer(1))
app <- ts_app(f) # class of 'OCref'
# this can now be used in an Rserve application, for example