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
0 answers

R code to be enabled for API requests

I have an R code which loads the RandomForest model, I am looking to create a function which load(model) randomforest_func = function(data) { data$pred = predict(model,data,type="prob") output = data.frame(data$customerid,data$pred[,2]) …
Praveen K
  • 11
  • 3
0
votes
1 answer

How to get php code to be executed within opencpu package

I'm using R with the R package opencpu to serve results of code. I would like to get my pages to be served as php and not just standard http. Currently, a standard inst/www/info.php like is not interpreted, firefox just offer…
cmbarbu
  • 4,354
  • 25
  • 45
0
votes
1 answer

How can I pass higher order functions via ocpu.rpc?

I'm trying to pass a function to a function in my opencpu app using ocpu.rpc. I know the opencpu API can handle it because I've tested with the sapply function in base R (among others) using the API test facility. However, I've been unable to…
wdkrnls
  • 4,548
  • 7
  • 36
  • 64
0
votes
0 answers

OpenCPU markdown document with arguments

I would like to produce reproducible markdown documents using OpenCPU that accepts arguments. Similar to the basic example here: curl https://public.opencpu.org/ocpu/library/knitr/examples/knitr-minimal.Rmd -d "format=html" I would like to include…
0
votes
1 answer

Import custom function to openCPU

How to add custom (in the form of a string) R function to openCPU (running as a local server) library using openCPU JavaScript API or jQuery? Using something like var myfunc = "ff <- function(x,y) { x+y…
yari
  • 165
  • 1
  • 6
0
votes
0 answers

Using opencpu in production

It might be a simple question but... Say I deploy a MEAN application. I also have opencpu server installed on my machine and also a package with /inst/www/ directory in it. So my question is, Do I need to put all the ejs files in /inst/www/…
user1665355
  • 3,324
  • 8
  • 44
  • 84
0
votes
2 answers

Using AngularJS $scope within OpenCPU

I have an alright knowledge of angularjs but I am more of a R programmer and I have therefore being experimenting with OpenCPU js library. One thing I can't get my head around is why I can't assign the output from a simple API request to the public…
amwill04
  • 1,330
  • 1
  • 11
  • 18
0
votes
1 answer

Sessions in OpenCPU: what are the specifics?

After reading this blog post on OpenCPU, I have questions about Sessions: * when/how do sessions expire? * can session expire time be configured on the server? * can session expire time be changed at runtime? * are sessions saved on-disk or…
0
votes
0 answers

Using custom methods through OpenCPU's JS lib

If I have my own server with OpenCPU running, and an OpenCPU application installed, how do I allow it to use custom methods that I wrote? What I'm doing now is creating /R/method.R, generating documentation with doxygen, and then calling the method…
vinit_ivar
  • 610
  • 6
  • 16
0
votes
1 answer

Are chained ocpu.call() faster than successive ocup.rpc()?

I found opencpu to be significantly slower than the corresponding R function called within R. One of the reasons might be that I exchange data back and forth between the server and the client using: ocpu.rpc() every time the user gives an input and…
cmbarbu
  • 4,354
  • 25
  • 45
0
votes
1 answer

rpc call to R function is not responding in case of OpenCPU cloud server, although it is working fine in single user server

I am using OpenCPU for my R project web interface. the project is working fine and i'm able to get results as expected on my local machine (single user server). then I deployed my project on VM and it didn't work. On VMs the R functions are working…
user5140464
0
votes
1 answer

Install OpenCPU on a Bitnami server

Bitnami servers seem to use their own implementation of Apache, which runs independently of the standard Linux Apache. I'm not entirely sure how this works, but how do I 'tie' my OpenCPU install to the appropriate Apache implementation? Thanks!
vinit_ivar
  • 610
  • 6
  • 16
0
votes
1 answer

How does package hosting work Opencpu

I wonder if I must host my R package on opencpu cloud server or GistHub even if I use my own Opencpu server on Amazon?
user1665355
  • 3,324
  • 8
  • 44
  • 84
0
votes
0 answers

Update R package version on OpenCPU

I committed and pushed the updates of the R function on GitHub. However, when I check this function on OpenCPU it remains of the old version. https://public.opencpu.org/ocpu/github/Klausos9/test/R/test/print I tried to re-run the command…
Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217
0
votes
1 answer

Jiddle for executing R function published on OpenCPU

I uploaded my R package to GitHub and then published it on OpenCPU as explained here. https://public.opencpu.org/ocpu/github/Klausos9/test/R/test/print test is a function that contains squared root estimation formula. Now, in JFiddle, I am trying…
Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217