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

OpenCPU how to install a package in R/pub?

I'm unclear about how to install an R package under R/pub in openCPU on my own openCPU server. The openCPU documentation states that package installation is handled by the administrator, but does not give any instructions (that I can find)…
Eli Hooten
  • 994
  • 2
  • 9
  • 23
2
votes
2 answers

Interacting with openCPU

I've stumbled across an awesome open source project called openCPU.org and I'm tremendously excited about the project. As a research scientist trying to create a website hosting my work, I would love nothing more than to be able to run R on the…
Dr Nick Engerer
  • 765
  • 7
  • 10
2
votes
3 answers

How to call an self-designed R function on openCPU via javascript?

The new openCPU platform allows integration of R functions within HTML/javascript. However I have been struggeling with the implementation. Could somebody provide an example of how to upload your self-designed R function to openCPU and call it with…
jokel
  • 982
  • 3
  • 11
  • 15
1
vote
0 answers

"Bad Request: package 'ggplot2' is required by 'plotly' so will not be detached"

I am working with an openCPU app and I am trying to plot a plotly plot with it. I have a function built that makes a ggplot and then passes that plot into the plotly::ggplotly() function and generates the plot after. I have a separate function that…
jonaldo
  • 33
  • 3
1
vote
1 answer

Is it possible to control the HTTP response behavior in openCPU?

According to the openCPU documentation, there are some default HTTP status codes and return types for a few situations. For example, when R raises an error, openCPU returns code 400 with a response type of text/plain. While I believe it should be…
eduardokapp
  • 1,612
  • 1
  • 6
  • 28
1
vote
0 answers

How to use a data object from a package as an input for a function in OpenCPU?

When using OpenCPU's api, For example, I can retrieve the cats dataset from MASS using this api: curl https://cloud.opencpu.org/ocpu/library/MASS/R/cats/json and suppose there is a function, say: play(x) then how can I use the cats set retrieved…
Jinshuai Ma
  • 109
  • 2
  • 8
1
vote
0 answers

Problem with listing FTP file names on M66 OpenCPU with AT+QFTPNLST

I have a hardware with quectel M66 module. I am also using the module as main processing unit, so the default Opencpu is quite changed. Also there is a watchdog applied to the module. I am trying to open an FTP connection and get the file list on…
tagiyevv
  • 11
  • 3
1
vote
1 answer

Combine r-handler and tls

Is it possible to provide the Apache R-mod via TLS directly? Without the need to set up a reverse proxy? I'm trying to set up an OpenCPU instance without the typical reverse proxy configuration. It should be accessible via HTTPS and HTTPS…
MPW
  • 161
  • 1
  • 3
  • 16
1
vote
1 answer

Trying to install OpenCPU on CentOS 7 server running WHM & CloudLinux

I'm trying to run OpenCPU on a CentOS 7 dedicated server that is already running WHM and CloudLinux. The first step was to install dependencies : yum install rpm-build make wget tar httpd-devel libapreq2-devel R-devel libcurl-devel protobuf-devel…
melomane
  • 13
  • 4
1
vote
0 answers

ocpu.rplot() show R ggplot on html without labels but opencpu API results have

I can get correct R plots with text labels (ggplot and ggrepel) from a remote R plot function through opencpu API, but get wrong plots through ocpu.rplot call, using opencpu-0.4.js, with the same remote R plot function. The wrong plot got no text…
1
vote
1 answer

How to set a custom HTTP status code from inside OpenCPU R function

I have an R function on OpenCPU (provided from OpenCPU docker image: https://hub.docker.com/r/opencpu/rstudio/) which filters data by some criterias. If there is no data to return I want to send a message (No data) with 204 status code. How can I…
1
vote
1 answer

Who manages (creates, allocates memory, etc.) R sessions / R processes within OpenCPU?

We have an OpenCPU cloud server, installed on a RedHat server with Apache 2.0 and rApache, which runs some quite memory- and processing-intensive calculations. Our app runs rather slowly (slower than on a less powerful laptop) - we think this is…
Milica
  • 23
  • 7
1
vote
1 answer

Delete object from opencpu session

How do I delete a previously created object in OpenCPU? I need to delete some unused objects. For example, the result of a POST is the…
steora
  • 13
  • 4
1
vote
1 answer

The jsonlite::fromJSON(data.json) function do not work within a package function

The simplified code of my R script is: library(jsonlite) function_name <- function(data.json) { tmp <- jsonlite::fromJSON(data.json) } This runs perfect on my local PC. Then I build a package, upload the package to an ubuntu server and use the…
1
vote
1 answer

Which user is running the R on OpenCPU server side?

I'm inexperienced in using opencpu as a server and so I tried to find a answer to this in the documentation but did not found any answers to this question. Never the less this seems quite basic to me in terms of permission and authentication, so I…
HolgerBarlt
  • 307
  • 1
  • 18