Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakutis/rserve-client
A stateful client for Rserve, the TCP/IP server for R framework.
https://github.com/jakutis/rserve-client
Last synced: 2 months ago
JSON representation
A stateful client for Rserve, the TCP/IP server for R framework.
- Host: GitHub
- URL: https://github.com/jakutis/rserve-client
- Owner: jakutis
- License: mit
- Created: 2014-02-18T11:39:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-10-06T16:23:45.000Z (over 6 years ago)
- Last Synced: 2024-11-06T18:00:44.676Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.org/package/rserve-client
- Size: 37.1 KB
- Stars: 10
- Watchers: 4
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# rserve-client
A stateful client for Rserve, the TCP/IP server for R framework.
[![Build Status](https://travis-ci.org/jakutis/rserve-client.svg)](https://travis-ci.org/jakutis/rserve-client)
- [Installation](#installation)
- [API](#api)## Installation
Install with [npm](https://www.npmjs.org/package/rserve-client):
$ 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();
});
});### .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.