The OpenCPU system exposes an http API for embedded scientific computing with R. The server can run either as a single-user development server within the interactive R session, or as a multi-user linux stack based on rApache and NGINX. The current R package implements the core of the system. When loaded in R, it automatically initiates the single-user server and displays the web address in the console. The OpenCPU website has more detailed API documentation.
- Official API documentation
- Paper: Towards a Universal Interface for Scientific Computing through Separation of Concerns
- Example apps
- JavaScript client: opencpu.js
- Server manual: PDF
To install the cloud server in Ubuntu 14.04 or Ubuntu 16.04
#requires ubuntu 14.04 (Trusty) or 16.04 (Xenial)
sudo add-apt-repository -y ppa:opencpu/opencpu-1.6
sudo apt-get update
sudo apt-get upgrade
#install opencpu server
sudo apt-get install -y opencpu
#optional
sudo apt-get install -y rstudio-server
See the opencpu website for details how to install on other platforms.
The single-user development server will automatically start when the package is loaded in R:
> library(opencpu)
Initiating OpenCPU server...
Using config: /Users/jeroen/.opencpu.conf
OpenCPU started.
[httpuv] http://localhost:7722/ocpu
OpenCPU single-user server ready.
Use opencpu$browse()
to open the testing page in a browser.