Questions tagged [opencpu]

OpenCPU is a software framework for embedded statistical computation and reproducible research. The server exposes a web API interfacing R, Latex and Pandoc.

OpenCPU provides a REST API to the R computing language. One of the goals is to be able to embed R functionality in scalable systems and web applications, without requiring the user or system to install R.

OpenCPU deals with some of the technicalities that come with R and statistical computing, so that you can focus on your application. Furthermore, OpenCPU implements the concept of Open Computing. In a nutshell this comes down to the following:

Any client can execute arbitrary R code on an OpenCPU server. All R code on the server is by definition Open Source, and readable by anyone. When you publish your own code on the server, it authomatically becomes Open Source. A helpful UNIX analogy is that you have at least r-x privileges on anything on the system, and you rwx in your home directory.

We can mention the two sides of opencpu:

  • On the server side, opencpu serves R packages
  • On the front end side, opencpu is also a js library to interact with the REST API
268 questions
2
votes
1 answer

Send an image file using opencpu for processing

I am an R and OpenCpu newbie. I have been able to create and deploy a simple R package with a function, and make a REST call to the function with curl get a json response. I am using R 3.1.2 64 bit on Windows 7. I now want to send an image file (say…
santosh
  • 23
  • 3
2
votes
1 answer

OpenCPU: how to change the default port?

Is there a way to have OpenCPU listening on a port different from :80? It should be easy using Docker, but I'm running a dedicated Ubuntu machine as recommended here. ps. I'm only using opencpu-server without opencpu-cache and so without nginx.
Maurizio
  • 547
  • 5
  • 13
2
votes
0 answers

Is there a way to run a script through Opencpu without creating a package?

I am new to opencpu and I am trying this : Create a script to load dataframe in memory (on server of course) Give a method to query this dataframe through GET api. Can this be done for a large dataframe to keep it loaded once? And can this be done…
ajkl
  • 1,016
  • 1
  • 7
  • 27
2
votes
1 answer

Custom R package on OpenCPU / Package found, but no functions visible

CI have written an R package for OpenCPU and want to use it on my own Cloud server. I cannot access any functions even though the package itself is recognized and can be updated, and I can access other (non-custom, e.g. base or stats) packages…
Wordsmyth
  • 443
  • 4
  • 16
2
votes
1 answer

Accessing objects in opencpu sessions

How do I access a specific object in an opencpu "session" in a subsequent function call? Given a request, say to /ocpu/library/base/R/eval with parameter expr = "x <- 10; y <- 20" Which…
Stefan
  • 1,835
  • 13
  • 20
2
votes
1 answer

OpenCPU local installation and use

I have installed R 3.0.3 & OpenCPU package in it. When I use the library(opencpu) its giving me the url. When I enter the URL I am getting the Screen of HTTP request options,Method, End Point, parameter file & AJAX Request I need to post a custom R…
2
votes
1 answer

how to use CORS with OpenCPU

I have just found out about this fantastic project, called OpenCPU. I am currently trying to learn how to use CORS to integrate R in web applications. To do so, I am replicating a simple example, but until now I have been unsuccessful. I am trying…
Bjerring
  • 35
  • 4
2
votes
1 answer

Load .Rda file / Twitter Authentication in OpenCPU with R

I created a package which gets Twitter data with the twitteR package. But to do so it needs the authentication. By now I created a .Rda file on my local system containing the Twitter handshake and placed the file in my package. But when I want to…
JulianHi
  • 286
  • 2
  • 4
  • 14
2
votes
1 answer

memory limit opencpu / R

I've got a strange problem with opencpu. I'am setting up a webinterface to use xcms (R-package) and when reading an mzxml file with the webinterface I get the error : cannot allocate vector of size 207.2 Mb. This looks like an error from R, but if I…
ricoderks
  • 1,619
  • 9
  • 13
2
votes
1 answer

XSS concerns when using OpenCPU and knitr to print user-supplied data

I'm using openCPU and knitr to generate custom feedback after surveys. To this end, I basically let survey developers specify rmd files. In this use case, the survey developers are trusted, but the survey takers may not be. I'm now thinking about…
Ruben
  • 3,452
  • 31
  • 47
2
votes
2 answers

In opencpu, how to run R source file from gist?

I'm trying to execute the R file from gist. But I got this error: File not found: /tmp/ocpu-www-data/gist_library/ocpu_gist_zhangway_7308452/til.R -X post My R source file is publicly here. After I typed the HTTP request…
wei
  • 213
  • 4
  • 13
2
votes
1 answer

R packages inaccessible via "opencpu knitr app"

I started playing with OpenCPU a couple of weeks back and am getting hooked to it. I was able to succesfully install the "knitr" and "opencpu.demo" apps. The issue I am running into is when I try to invoke the R functions I packaged under a new r…
2
votes
1 answer

Memory requirements when hosting R in the cloud

What is the minimal size server we need to run opencpu, if we expect 100,000 hits a month? I think opencpu is an exciting project, but need to know about memory usage when opencpu is deployed, since a cloud hosting service such as rackspace charges…
2
votes
0 answers

Opencpu App-Development process and deployment

I found an R package opencpu-demo which gets installed as an App on the server. However it isn't clear which files the user needs to explicitly create in the /install directory and how to tie it with R functions. Does it require JavaScript embedded…
2
votes
1 answer

Using an output file stored on the OpenCPU server as input to a subsequent function call

Question: how can I use an output file stored on the OpenCPU server as input to another function? Background: I am attempting to use knitr and markdown within openCPU to generate html that I can use to update a webpage with statistical information…
Eli Hooten
  • 994
  • 2
  • 9
  • 23