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

opencpu: how to pass a script along with the data frame, and get back results

I am trying to find a way to remotely execute R code by passing input data (typically a data frame) and a script to opencpu (both data and script are generated on the client). The result of the remote execution would be the values of the specified…
0
votes
1 answer

object Object displayed in html page

I'm trying to display the graph plotted by the R function in the opencpu server. However,it only displays [object Object] in the html page. The following is the code in my AngularJS controller. var req = ocpu.rpc("plotGraph", { …
0
votes
3 answers

opencpu cloud server installation guide on ubuntu 16.04

Would anyone know or like to share their note on installing opencpu cloud server on ubuntu 16.04? I thought it is easy, but we saw many error here and there when following the instructions. I am new to opencpu. And, I don't have much experience on…
y g
  • 49
  • 1
  • 7
0
votes
1 answer

Compile .tex file with latexmk with www-data user (opencpu)

i run opencpu 1.5 [1] on ubuntu 14.04 server. My R-Package create an .tex file an trigger a system call to compile the pdf file with latexmk. system("latexmk -xelatex -interaction=batchmode mylatex.tex") On ubuntu 12.04 LTS it works fine.…
corium
  • 11
  • 1
  • 2
0
votes
1 answer

Prevent OpenCPU javascript error popup window

I have an error related to CORs for a test deployment of OpenCPU, which may get its own question, but for now I'd like it to fail without notifying the end user via a popup - is this possible? The error I see in the browser console is due to the…
MarkeD
  • 2,500
  • 2
  • 21
  • 35
0
votes
1 answer

How to use ocpu.r_fun_call?

I am able to use the opencpu function ocpu.rpc. But not the function ocpu_r_fun_call. Why the above code does not work?
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
0
votes
0 answers

Why is R function parameter being treated as an object

I have written a function in R as follows: createV <- function(vid){ vid1 = substring(toString(vid),3) return(vid1) } I have exposed this function as an api using opencpu when i call the API where parameter vid = "abcd123", it…
0
votes
1 answer

how to remove a level of nesting of a json array that is returned from R API

I have created a R API using OpenCPU that queries neo4j database and returns the result. The result looks like [ [ { "abc": "aabbcc1", "pqr": "ppqqrr1", "xyz": "xxyyzz1" } ], [ { "abc": "aabbcc2", …
0
votes
1 answer

Installing OpenCPU under an AMP Stack on Mac OS X

I currently have an OpenCPU application running nicely (in development) under Mac OS X. But before I move it into a full production environment I need to add various security features through an AMP stack. (I need to conditionally paint screens via…
0
votes
1 answer

Addressing OpenCPU graphics from JavaScript after ocpu.call

I have a web based OpenCPU application that (from the user's perspective) simultaneously provides both a tabular and graphical representation of model based forecasts. The forecasts are driven by user-supplied input data (predictor/independent…
0
votes
1 answer

opencpu inconsistent json serialization

Hi I want to use robfilter using opencpu. As the default robfilter response is not json serializable as such I created my own package with this function: detectOutliers <- function(json, windowWidth) { x <- json robfil <-…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
0
votes
2 answers

Installing OpenCPU on Amazon Linux instance

I have a an Amazon Linux instance which uses R to write a function to do some data analysis. I now want to call this function using a REST API. It seems that OpenCPU can get the job done for me. I have found links to install OpenCPU on Ubuntu, but…
kosta
  • 4,302
  • 10
  • 50
  • 104
0
votes
1 answer

connecting to remote database via opencpu javascript R libarary and rmysql library for mysql

I have a peculiar problem while trying to accessing database on remote server via opencpu javascript library for R and RMySQL library. Particularity, I have written R function that uses RMySQL library to access data from remote mysql server. And I…
Vinay
  • 27
  • 1
  • 6
0
votes
0 answers

how to run glm function in R stats package from spark using opencpu

how to run glm function in R stats package from spark using opencpu.I dont know as how will we pass data from spark to glm function using java.
Swaroop
  • 1
  • 2
  • 5
0
votes
2 answers

Using OpenCPU to access custom R function

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