rserve-client

0.3.5 • Public • Published

rserve-client

A stateful client for Rserve, the TCP/IP server for R framework.

Build Status

Installation

Install with npm:

$ npm install --save rserve-client

API

var r = require('rserve-client');
r.connect('localhost', 6311, function(err, client) {
    client.evaluate('a<-2.7+2', function(err, ans) {
        console.log(ans);
        client.end();
    });
});

See example directory.

.connect(hostname, port, callback)

Connects to Rserve at hostname on port and returns the connection via callback.

connection.evaluate(command, callback)

Evaluates the given command on Rserve and returns the result via callback. If client has disconnected, first reconnects, then evaluates.

connection.end()

Ends the connection by closing the socket.

/rserve-client/

    Package Sidebar

    Install

    npm i rserve-client

    Weekly Downloads

    32

    Version

    0.3.5

    License

    MIT

    Unpacked Size

    17.8 kB

    Total Files

    9

    Last publish

    Collaborators

    • jakutis