ts/man/ts_app.Rd
2025-02-24 14:35:02 +13:00

27 lines
753 B
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/function.R
\name{ts_app}
\alias{ts_app}
\title{Generate an Rserve app from a ts function}
\usage{
ts_app(x)
}
\arguments{
\item{x}{A ts function object (\code{ts_function()})}
}
\value{
An object of class 'OCref', see \code{\link[Rserve:ocap]{Rserve::ocap()}}
}
\description{
Anything that is not a function simply returns itself.
However, functions are wrapped with \code{Rserve::ocap()},
and the result is subsequently wrapped with \code{ts_app()}.
}
\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
}