src/clients
directory of the Rserve distribution which show a C/C++ client. Also
available from the Rserve pages is a Java client
(JRclient
). See http://rosuda.org/Rserve
for details.RSconnect(host = "localhost", port = 6311)
RSlogin(c, user, pwd, silent = FALSE)
RSeval(c, cmd)
RSclose(c)
RSdetach(c)
RSevalDetach(c, cmd = "")
RSattach(session)
RSassign(c, obj, name = deparse(substitute(name)) )
RSdetach
or
RSevalDetach
RSconnect
creates a connection to a Rserve. The returned handle
is to be used in all subsequent calls to client functions. The session
associated witht he connection is alive until closed via
RSclose
.
RSlogin
performs authentication with the Rserve. Currently this
simple client supports only plain text authentication, encryption is
not supported.
RSclose
closes the Rserve connection.
RSeval
evaluates the string in the remote Rserve and returns
the result. Note that you will have to load the same packages on both
ends if the result is an (S3/S4) object such that corresponding
classes and methods are available. Also note that the result is
transported on the network so sending huge results can be slow. Thus
consider sending only relebant parts or keep the results on the other
end if pertinent.
RSdetach
detaches from the current Rserve connection. The
connection is closed but can be restored by using RSattach
with
the value returned by RSdetach
. Technically the R on the other
end is still running and waiting to be atached.
RSevalDetach
same as RSdetach
but allows asynchronous
evaluation of the command. The remote Rserve is instructed to evaluate
the command after the connection is detached. Please note that the
session cannot be attached until the evaluation finished. Therefore it
is advisable to use another session when attaching to verify the
status of the detached session where necessary.
RSattach
resume connection to an existing session in
Rserve. The session
argument must have been previously returned
from the RSdetach
or RSevalDetach
comment.
RSassign
pushes an object to Rserve and assigns it to the given
name.