Questions tagged [plumber]

plumber is an R package used to create HTTP APIs from R. It uses annotations above your function definitions to define the structure of your API using existing R code.

The plumber R package allows R users to create HTTP APIs from their R code.

  • Official documentation - Includes documentation about the various features and online examples.
  • CRAN - The package is available on CRAN for easier installation.
307 questions
0
votes
0 answers

How to return image and data in the same request with plumber in r

I have a general question using R and plumber. How can I return an image which is a ggplot plot and a table of data (which is essentially a data frame) in the same request? The end result should be an image and beside it a table of data. I know how…
Corel
  • 581
  • 3
  • 21
0
votes
0 answers

accept nested json using post in plumber and accepts few arguments plumber

This is my api which accepts parameters. #' @param sepal.Length #' @param Sepal.Width #' @param Petal.Length #' @param petal.Width #' @post /predict #' @html calculate_prediction <- function(Sepal.Length,Sepal.Width,Petal.Length,Petal.Width) { } My…
0
votes
1 answer

Json variables are not getting as parameters or responses in get request in R plumber package?

I created host in swagger using plumber package in R.I added a json file as get request .But not getting a response.Showing parameters not found..The code I used is given below..I want to get this json file(cat(x)) as responses..Please help…
Vishnu Mankulam
  • 37
  • 1
  • 1
  • 9
0
votes
1 answer

R plumber api and data sending through Curl in windows

I need to send a CSV file using Curl in Windows to an R program using the plumber API. I have Curl installed in Windows. I've tried the following, but it doesn't work. I'm new to R and APIs, sorry. The Curl command on Windows: curl -X GET -d…
Aditya
  • 55
  • 1
  • 7
0
votes
0 answers

How to bind Rest API made from R to a dotnet application?

I have created an Rest API from R with plumber package which gives an prediction for the received input, and we have developed User interface(UI) in dotnet , please help me understanding the possible ways for integrating both
0
votes
1 answer

map_df function works but when inside Plumber api it fails

I'm making a deploy for R via plumber package api, the code itself runs flawlessly when local, but when it's inside plumber's environment it gives the follwing error
Ochetski
  • 105
  • 1
  • 13
0
votes
1 answer

Can a plumbed function be defined in another file (or package?)

I'm having some trouble getting the syntax on getting a plumbed function when that function is defined in another file. I want to put a standard plumb function in a package. My first try was something like this: # in the package #' Get results for…
MarkeD
  • 2,500
  • 2
  • 21
  • 35
0
votes
1 answer

rsconnect publishing API created by plumber

I have an API created by plumber in a file named lltoClass.R as follows: #* @get/ ll.toClass ll.toClass <- function ... Also, according to this question I have made a file named plumber.R containing:…
mjoudy
  • 149
  • 1
  • 1
  • 10
0
votes
1 answer

Public R Plumber remote

According to the documentation, https://www.rplumber.io/, it says that if we use plumber$run() it will just run locally localhost:8000. And I want to publish it in a remote. How can I start a remote API using plumber package?
0
votes
1 answer

Get json object using R and rjson library

My goal is to implement the response of plumber R HTTP package. library(rjson) formatResponse = function(matchId, home, draw, away) { return(toJSON(???)) } formatResponse('myId', 10, 20, 70); my goal is get: { matchId: 'myId', …
Edgaras Karka
  • 7,400
  • 15
  • 61
  • 115
0
votes
1 answer

Plumber R + Jquery - API Response NULL

Im trying to create an R-API using Plumber which accepts two arguments and returns a list object. The GET Call is happening using a JQuery Client but however the data is not getting displayed on the webpage . Tested the same API with Postman and the…
Jil Jung Juk
  • 690
  • 2
  • 9
  • 21
0
votes
1 answer

setting cookies with CORS requests in plumber

Is it possible to set cookies in plumber when dealing with cors connections? I have an angular app (say running on localhost:4200) and plumber api (say on localhost:8000), just trying to use the example code from documentation: #* @get…
h1427096
  • 273
  • 1
  • 9
0
votes
0 answers

How to change environment in R plumber?

I am facing a problem using plumber, when I "plumb" my code all my data.tables are reset to data.frame after each set of operations. I thought the issue could be due to environment.I tried to play with envir parameter in the plumb function but…
Jatin Garg
  • 121
  • 4
0
votes
1 answer

Deploying plumber API via rsconnect (Handler not found)

I have a directory with a example API function (testAPI.R): #* @get /mean normalMean <- function(samples=10){ library(plumber) data <- rnorm(samples) mean(data) } The rsconnect::deployAPI() function wants to point to a directory with a file…
Ross Ireland
  • 193
  • 1
  • 5
0
votes
1 answer

Plumber R post on server dosen't work

I'm building an Shiny-App with different API connections. It's all running on a server (CentOS Redhat). I've got a problem with my API. If I'm running this on my terminal (Mac), everything works. curl --data…
D. Iseli
  • 61
  • 8
1 2 3
20
21