Share and access R code, data, apps on ocpu.io

[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

ocpu.io is a new domain for publishing code, data and apps based on the OpenCPU system. Any R package on Github is directly available via yourname.ocpu.io. Thereby the package can be used remotely via the OpenCPU API to access data, perform remote function calls, reproduce results, publish webapps, and much more. The OpenCPU public server page explains how requests to ocpu.io map to the existing public demo server.

Examples

Action URL (short)
List packages on CRAN cran.ocpu.io
List packages on BioConductor bioc.ocpu.io
Github repositories from: Hadley hadley.ocpu.io
Package Info
MASS from CRAN cran.ocpu.io/MASS/
plyr from CRAN cran.ocpu.io/plyr/
plyr from Github hadley.ocpu.io/plyr/
Package Contents
MASS datasets cran.ocpu.io/MASS/data/
plyr datasets hadley.ocpu.io/plyr/data/
plyr R objects hadley.ocpu.io/plyr/R/
plyr help pages hadley.ocpu.io/plyr/man/
plyr files hadley.ocpu.io/plyr/DESCRIPTION
Datasets
mammals sleep data (print) hadley.ocpu.io/ggplot2/data/msleep/print
mammals sleep data (csv) hadley.ocpu.io/ggplot2/data/msleep/csv
mammals sleep data (json) hadley.ocpu.io/ggplot2/data/msleep/json
mammals sleep data (json columns) hadley.ocpu.io/ggplot2/data/msleep/json?dataframe=column
Manual pages
msleep help (text) hadley.ocpu.io/ggplot2/man/msleep/text
msleep help (html) hadley.ocpu.io/ggplot2/man/msleep/html
msleep help (pdf) hadley.ocpu.io/ggplot2/man/msleep/pdf
Example Apps
appdemo (src) opencpu.ocpu.io/appdemo/www
stocks (src) opencpu.ocpu.io/stocks/www
nabel (src) opencpu.ocpu.io/nabel/www
markdownapp (src) opencpu.ocpu.io/markdownapp/www
mapapp (src) opencpu.ocpu.io/mapapp/www

How to use

To start publishing on ocpu.io you need to put your R functions, datasets, scripts, sweave/knitr documents into an R package and put it up on Github. This is not too difficult, there are many guides on how to do this. OpenCPU requires the name of the Github repository to match the name of the R package it contains. Use devtools to test if your package is working:

library<span class="p">(</span>devtools<span class="p">)</span>
install_github<span class="p">(</span><span class="s">"pkgname"</span><span class="p">,</span> <span class="s">"username"</span><span class="p">)</span>

If this succeeds you’re good to go. Navigate to username.ocpu.io/pkgname where username is your Github login. The API docs and JavaScript docs explain how to read objects, files and datasets, RPC functions and develop apps.

By default the OpenCPU public server updates packages installed from Github every 24 hours. However, the Github webhook can be used to update the package immediately every time a commit is pushed to github.

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

R-bloggers.com 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)