OpenCPU 1.0 release!

[This article was first published on OpenCPU, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

opencpu logo

After more than 3 years of development, we release the first official version of the OpenCPU system. Based on feedback and experiences from the beta series, OpenCPU version 1.0 has been rewritten entirely from scratch. The result is simple and flexible API that is easier to understand yet more powerful than before.

With the new release also comes a new website and blog in which we will post tutorials and examples over the upcoming weeks/months. This first post features some highlights to get your feet wet.

The package API

Try opening these URL’s in your browser to explore objects and manuals (help pages) from a package:

Or interface static files:

External Repositories

The /ocpu/library/ API interfaces to packages which are installed in the global library on the server. Want to try another package? With a little extra patience, you can open any package straight from cran or github:

Of course this will only work if the package installation is successful. When a package on an external repository is accessed for the first time, the request might take quite a while because it is installed on the fly. But once it is working, you can use it just like packages installed on the server.

This way you can share your own packages and apps without hosting a personal OpenCPU cloud server.

Running a function / script

The core feature of OpenCPU is the ability to call functions and run scripts (including sweave/knitr scripts). To get started, you can use the testing page to poke around in the API. Alternatively use curl to call OpenCPU from your command line:

#run a script
curl -X POST

#call a function
curl -d 'n=10&mean=5'

A successful POST will always return a HTTP 201 response indicating the location of where to retrieve results from the execution (objects, graphics, files, stdout, etc)

OpenCPU Apps

One of the major improvements in OpenCPU 1.0 is improved support for apps. An OpenCPU app is an R package which includes some web page(s) that call the R functions in the package using the OpenCPU API. This makes a convenient way to develop, package and ship standalone R web applications. Have a look at the example apps.

The single-user server

OpenCPU 1.0 is available both as a cloud server, and single-user server. The latter will run inside an interactive R session and is used to run and develop local apps.


After installing OpenCPU, we install apps just like we would install a package:


#gitstats app
install_github("gitstats", "opencpu")

#stocks app
install_github("stocks", "opencpu")

#nabel app
install_github("nabel", "opencpu")

To leave a comment for the author, please follow the link and comment on their blog: OpenCPU. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)