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

How to start/stop/flush OpenCPU on CentOS6?

I've successfully built and installed OpenCPU and RStudio Server on a CentOS6. Everything is working as expected, and I do get successful GET/POST responses for my local R packages. A couple of things that don't seem to work however: I can't figure…
mbacou
  • 131
  • 8
3
votes
1 answer

Cannot get results from sqlite database with opencpu

I have a relatively simple function to extract some data from an sqlite database: library(RSQLite) db.select <- function(table="mydata", vars, rows=c()) { vars <- paste(unlist(vars), collapse=", ") q <- paste("SELECT ", vars, " FROM ", table,…
Bertjan Broeksema
  • 1,541
  • 17
  • 28
3
votes
2 answers

Task model for long-running jobs in OpenCPU?

To my knowledge, there is no task model in OpenCPU, i.e. one has to wait arbitrarily long with an open TCP connection until the request finishes. One possibility for a task model implementation would be to return a dedicated task uri with status…
A.M.
  • 323
  • 2
  • 11
3
votes
1 answer

Opencpu and R-statistics

I am wanting to use OpenCpu to do statistical web-based apps. BUT, the documentation I see on the web seems to be contradictory. Just trying to get started is difficult for a newbie. I hope someone knows how. I have seen some posts here on…
Palu
  • 668
  • 3
  • 11
  • 26
3
votes
1 answer

Dotted parameter names and/or variables in R

For a Ruby project I need an OpenCPU server to process some statistics by R packages. OpenCPU has an JSON REST API, so with Ruby I can easily hook into that to communicate with R. So far, so good. One of those packages has a strange (at least to me)…
Ivan
  • 874
  • 10
  • 32
3
votes
2 answers

OpenCPU and jsonlite: column-based "/json" versus row-based

Is there a clean way to change the default "/json" postfix option on data.frames to be column-based versus row-based? Data.frames in R, if I understand correctly, are really just named lists where each list is the same length as the others. Using…
r2evans
  • 141,215
  • 6
  • 77
  • 149
3
votes
1 answer

Failed to display R script on the local OpenCPU single-user server

I set up a local OpenCPU single-user server using RStudio. I also create my own R package(Package name: test) which includes only a simple test.R file. The source code is f1 <- function(x, y) {x+y} I started the OpenCPU server by typing…
wei
  • 213
  • 4
  • 13
3
votes
1 answer

How to chain two function calls in opencpu

OpenCPU is said to support chaining of function calls to calculate e.g. f(g(x), h(y)) The docs about argument formats: https://public.opencpu.org/api.html#api-arguments includes an example that illustrates this by…
mike
  • 45
  • 5
3
votes
3 answers

The Role of Data in openCPU

I am well aware of the fact, that this might not be the typical SO question, but since this is the strongest R programming community I know and the author of opencpu explicitly encourages to post here, I'll give it a try: What role does data play in…
Matt Bannert
  • 27,631
  • 38
  • 141
  • 207
2
votes
1 answer

How do I set a domain name to an OpenCPU app?

I have a Ubuntu 18.4 LTS server running OpenCPU, and am able to run the application myapp by pointing my browser to the address http://myip/ocpu/library/myapp/www/. I wish to make the app available via the domain name mydomain.name, and have set up…
Stef van Buuren
  • 348
  • 1
  • 10
2
votes
1 answer

How can I connect remote Opencpu server installed in RHEL/centOS platform and use opencpu JS to get results from R?

I am trying to connect R from a browser using opencpu js. I cannot have opencpu in local mode and I need it to run in remote host so that my javascript based app server can be access by multiple users from where bunch of input data needs to be sent…
user2359902
  • 121
  • 1
  • 7
2
votes
1 answer

No welcome page after openCPU install in fresh Ubuntu 18.04 instance

I am trying to install OpenCPU 2.1 on a fresh free tier AWS server. I followed [https://aws.amazon.com/getting-started/tutorials/?awsf.getting-started-content=use-case-tmt%23websites-apps], and launched a Ubuntu Server 18.04 LTS (HVM), x86, free…
Stef van Buuren
  • 348
  • 1
  • 10
2
votes
0 answers

opencpu app is not deployed on public server

I am a beginner to opencpu service and I want to deploy my app on opencpu public server. I tried using GitHub webhook to deploy my app as the opencpu guide says on their website. According to opencpu after pushing R package code to GitHub and…
2
votes
1 answer

Is there a function to find packages duplicated across library folders?

I'm maintaining an openCPU (R API) instance with frequent package updates. OpenCPU (sensibly) separates its own core packages into different folders, so that they aren't accidentally broken out of the lockstep with the installed version. However,…
Ruben
  • 3,452
  • 31
  • 47
2
votes
0 answers

R extend Method to dependend Namespace

I've the following Problem: I'm using the opencpu package to provide my R Package as a web application. In my package I created a RefClass lets call that .A <- setRefClass( ".A", fields = c( id = "integer", text = "character" …
HolgerBarlt
  • 307
  • 1
  • 18
1 2
3
17 18