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
0
votes
1 answer

r - opencpu - error in executing ocpu_start_app()

I found out about opencpu as alternative to Shiny and I started to use it. I am having problem in executing ocpu_start_app(). I manage to get ocpu_start_server() running just fine. I then stopped the server and tried to execute…
addicted
  • 2,901
  • 3
  • 28
  • 49
0
votes
1 answer

Disable directory listing in OpenCPU

I have been trying to disable directory listing in OpenCPU so our users cannot see the resulting directories and files in the http://server/ocpu/tmp/ directory. I have followed Apache's Directory Listing Configuration and deleted every mention of…
Jaime Campos
  • 3
  • 1
  • 1
0
votes
1 answer

Problems Running OpenCPU on a Specified Port

My goal is to access the OpenCPU when I start the browser, e.g. localhost:7978/ocpu/. However, I have problems changing the port to a predictable setting. By default, my localhost server randomizes the port number. I tried the following — How to set…
noumenal
  • 1,077
  • 2
  • 16
  • 36
0
votes
1 answer

r; opencpu won't start

I am installing opencpu on a new windows 10 box. It already runs on two other windows machines. The library is found but opencpu is not recognized as an object, so the server does not start > library(opencpu) Loading config from…
Jake
  • 4,322
  • 6
  • 39
  • 83
0
votes
2 answers

Need help for OpenCPU and igraph output format

My data Adjancy array is var g = [[10, 2], [15, 0], [18, 3], [19, 6], [20, 8.5], [25, 10], [30, 9], [35, 8], [40, 5], [45, 6], [50, 2.5]] and my OpenCPU code is ocpu.call("centralization.closeness", {graph: g}, function(res){ …
Asad Ali Khan
  • 307
  • 4
  • 16
0
votes
0 answers

OpenCPU error HTTP 400 Not a graph object

I m using Angularjs and OpenCPU to calculate some data through Igraph R Package Graph is a adjacency matrix/Array generate by java…
Asad Ali Khan
  • 307
  • 4
  • 16
0
votes
1 answer

How do I return a text string from the OpenCPU that respects the line breaks?

I am trying to print a screenshot from the OpenCPU, which returns everything in a group and does not accept the line breaks. When using console.log() I get the open cpc url with the perfect line breaks, but in the index I get out This is my…
0
votes
1 answer

OpenCPU serialisation in case of list output

OpenCPU developers, I am trying to use OpenCPU to run custom functions code and want to return more than one parameter using "list". Something like that: result = list(x=data.frame(a),y=data.frame(b)) return (result) It works well, but OpenCPU…
0
votes
1 answer

OpenCPU server requests

I'm developing a web application that should interact with some R scripts and I would very much like to use openCPU. However, I do not see if there is any way I can do other AJAX requests besides calling the R scripts or fetching their results. I…
Marin Veršić
  • 404
  • 4
  • 10
0
votes
1 answer

OpenCPU using a different version of R as opposed to the R already installed in the system?

I have R version 3.3.1 running on Ubuntu 16.04. I also have RStudio server running on the same. Now I install opencpu by sudo add-apt-repository ppa:opencpu/opencpu-1.6 –y sudo apt-get update sudo apt-get install opencpu The apache2 and opencpu…
j1897
  • 1,507
  • 5
  • 21
  • 41
0
votes
1 answer

Opencpu long running R analysis

I have an R code which I am trying to call over HTTP using opencpu, but for the long running code, it is getting timeout. I came across https://github.com/joelkuiper/aplomb Unfortunately, the documentation is not detailed and I am unable to figure…
Prabhakar
  • 402
  • 6
  • 20
0
votes
1 answer

opencpu server user libaries not available

i updated my opencpu infrastructure: opencpu 1.6 RStudio Version 1.0.44 R version 3.3.1 (2016-06-21) in /rstudio i install some packages .libPaths() [1] "/home//R/x86_64-pc-linux-gnu-library/3.2" [2] "/usr/local/lib/R/site-library" …
corium
  • 11
  • 1
  • 2
0
votes
1 answer

Opencpu call takes longer than expected

I'm trying to call a function from the flexsurv package using opencpu. I am running on OSX Sierra. I have modified my opencpu .conf file to include flexsurv in the list of preloaded packages: { "enable.api.library": true, "enable.api.apps":…
jrdnmdhl
  • 1,935
  • 18
  • 26
0
votes
1 answer

openCPU and rstan - cannot open the connection

I'm using openCPU to create an API to estimate pretty basic models in rstan. I have verified that my function works in my environment when called from a normal R console session, as opposed to called from openCPU. But when called via openCPU, the…
MDe
  • 2,478
  • 3
  • 22
  • 27
0
votes
1 answer

Invalid graphics state opencpu

I'm currently using opencpu to host my R packages. But it is not displaying the graph. I get the pdf, svg and pdf links and the graph is displayed if I click on either one of them. However, within the console I have this error "invalid graphics…