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
1
vote
1 answer

How SC_CTOR works in SystemC

In SystemC module constructor can be defined using SC_CTOR macro: #define SC_MODULE(user_module_name) \ struct user_module_name : ::sc_core::sc_module #define SC_CTOR(user_module_name) \ typedef…
anshkun
  • 105
  • 1
  • 12
1
vote
2 answers

How can I keep toJSON from quoting my JSON string in R?

I am using OpenCPU and R to create a web API that takes in some inputs and returns a topoJSON file from a database, as well as some other information. OpenCPU automatically pushes the output through toJSON, which results in JSON output that has…
Caroline
  • 450
  • 1
  • 5
  • 15
1
vote
1 answer

Local host opencpu in R takes a VERY long time

I've installed opencpu package in R. I am running the following linein R: library(opencpu) It runs very quickly and says "Welcome to Open CPU!" Then I run the following line: ocpu_start_server() It takes about 10 min to say: OpenCPU single-user…
user3245256
  • 1,842
  • 4
  • 24
  • 51
1
vote
1 answer

Serve an opencpu app on an ipv4 address in a windows environment

The way opencpu "productionnise" an app is to get your own linux server then to install your package and then launch your app. Before that, I am still in a dev environment, where I work on a windows machine. I would like to run the app locally…
YCR
  • 3,794
  • 3
  • 25
  • 29
1
vote
1 answer

How can I solve Error: object 'opencpu' not found

I tried to load the appdemo into opencpu and it gave me an error. How should I solve this error? Steps to Reproduce: 1. git clone git clone https://github.com/rwebapps/appdemo.git 2. sudo -i R[enter image description here][1] 3. library(opencpu) …
swirlydino
  • 29
  • 4
1
vote
0 answers

Why does OpenCPU perform better when returning listed objects?

I noticed while benchmark testing the OpenCPU API that a function which returns a listed data frame will take considerably less execution time than returning an unlisted data frame of the same size. It's more noticeable with larger data frames.…
MJR
  • 33
  • 6
1
vote
0 answers

Writing File to Google Cloud Store Bucket

Just a quick question please guys - Could do with some help with the role of a user in the use of OpenCPU Trying to run a small R script that copies a file from local to Google Cloud Store Bucket - consider a toy example write.table(1:10,…
1
vote
1 answer

What happened to opencpu$browse?

I had an opencpu application packaged in R, and installed locally and used by opencpu$browse(). It's been a while since I used this and after updating opencpu to the latest version, it doesn't recognise this function anymore and I can't find release…
astrochoi
  • 13
  • 4
1
vote
0 answers

Background OpenCpu R process in Docker

I'm running R script in OpenCPU/Docker and looking for the way how I can run the script that will create background process and returning back the message that the process has started. Something like this: fun1<-function(arg1,arg2){ #calling…
John Snow
  • 153
  • 7
1
vote
0 answers

Improve performance when calling a R-package

We have created a R-package that should do near realtime scoring through OpenCPU. The issue now is that we are having a very large overhead calling our package. The R part is executed quite fast so the overhead is before and after R is initialized.…
leboldt
  • 11
  • 2
1
vote
0 answers

How to use opencpu.js for calling R function from javascript/jQuery (Using Wampserver)?

I am trying to use R function dynamically, which means I will be passing parameters from javascript/jQuery. In response, R function should return results dynamically. I am trying to use opencpu.js to enable this operation. However, I don't…
1
vote
1 answer

Error starting OpenCPU in rstudio OnAttach failed

I am trying to get a simple OpenCPU Apps (from https://www.opencpu.org/download.html). Since I am on Ubuntu on AWS, I follow the instructions for Ubuntu: # Requires Ubuntu 14.04 (Trusty) or 16.04 (Xenial) sudo add-apt-repository -y…
grammar
  • 917
  • 2
  • 9
  • 18
1
vote
1 answer

opencpu not working with data.table in R

I am using the R package data.table to deal with big data files. However, I found it cannot be used with opencpu. For example, my R function is, foo <- function() { library(data.table) iris = data.table(iris) o = iris[,.N,Species] …
1
vote
0 answers

R base function 'list.files()' returns empty result on the openCPU in some specific folder paths

I tried 'list.files()' function on openCPU test page (/ocpu/test) with Endpoint: /ocpu/library/base/R/list.files/json Param Name : path Param Value : '/home/dykim22' then it returned correct list of files of my home folder. Yes it works. However,…
Daeyoung Kim
  • 126
  • 6
1
vote
1 answer

Best practice submit long-running R-jobs, retrieve later?

What is the best way to work from a Mac-laptop and, send an .Rda-file to an Ubuntu-desktop with the input-data, run the processing, and then later get a new .Rda with the results back to the Mac-laptop? My R-workflow is mostly about tweaking plots…
Chris
  • 2,256
  • 1
  • 19
  • 41