OpenCPU Release 1.0.4

October 17, 2013
By

(This article was first published on OpenCPU, and kindly contributed to R-bloggers)

opencpu logo

OpenCPU version 1.0.4 was released to CRAN and Launchpad this week. This release brings some bug fixes/improvements and no breaking changes so you can safely upgrade your 1.0.x installations. Upgrade an existing OpenCPU cloud server using:

sudo apt-get update
sudo apt-get upgrade 

Or to install the latest version of the OpenCPU local single-user server in R:

update.packages(ask=FALSE)
install.packages("opencpu", repos="http://cran.r-project.org")

New in this release

One improvement in this release is the capturing of output from the package installation process. This is surprisingly difficult in R, but thanks to some helpful tips on r-devel, we found a way to implement it. This makes it much easier to diagnose the problem if a certain package fails to install on OpenCPU.

For example: as described in the API manual section on libraries, the /ocpu/cran/, /ocpu/bioc/ and /ocpu/github/ APIs represent remote libraries: when a client calls a package in any of these libraries for the first time, the OpenCPU server will attempt to install the current version of the corresponding package on the fly (if not already available), before processing the request. In a previous post we described how this allows anyone on the internet to use your R package without even installing R.

However, sometimes the installation of a package fails, for example because of a missing dependency or version conflict. To make it easier to diagnose the problem, the OpenCPU server now returns the output from the package installation process for failed installations. For example, here are two packages that fail to install, and now we know why :–)

Loading these pages can take a couple of seconds because we have to wait for the installation process to complete. However once a package installation has succeeded it is stored for 24 hours so that the next request/user will be able to use it instantaneously.

About Local and Remote libraries

It is important to note that the above only applies to the mentioned remote libraries. Package in any of the local libraries such as /ocpu/library/ are already installed on the server. When running your own OpenCPU server, it is preferable to install your package on the server in the usual ways and call it via the local library API. The remote libraries are mostly intended to allow anyone to share and use arbitrary packages on public OpenCPU servers.

To leave a comment for the author, please follow the link and comment on his blog: OpenCPU.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.