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

R Plumber Slack Bot Response

I'm trying to create a bot response to slack using Plumber and I can get the model to work and get a text response when querying from the command line or testing from swagger. When I use a slash command from Slack though the response comes back but…
Matt
  • 11
  • 2
0
votes
1 answer

I want to add a filter in R plumber APi which can throwh an error of unresposive urls

Need a filter which can show non responsive url with an error code #* Return LDA of all sites #* @param a Enter your Website #* @param b:[chr] Enter URLs #* @param v The focused keyword #* pr_set_error(pr, fun) function(req,…
0
votes
0 answers

"An exception occurred" when hitting RPlumber API from Ubuntu 16.04

I am using RPlumber to create an API that makes some data available to the users of the API. I created an Ubuntu 16.04 server on Linode to host the API. I have successfully installed R on the server, and all of the libraries, and am able to run the…
Canovice
  • 9,012
  • 22
  • 93
  • 211
0
votes
1 answer

REST API with R Plumber - GeoJSON as Input

I am trying to wrap a function into REST API using plumber R Package. As a Input , function takes a shape file and returns GeoJSON as Output after the transformation. #* Return Spatial Polygon Object in form of GeoJSON #* @param dsn:character Path…
string
  • 787
  • 10
  • 39
0
votes
1 answer

Hosting R Plumber on AWS EC2

I'm pretty new into the whole app development ecosystem and I currently have R Studio running on an EC2 instance on AWS. I was hoping to use this to deploy an R Plumber API that would be used by my frontend in React. Is there a way to allow…
jang119
  • 15
  • 3
0
votes
0 answers

R plumber and jsonlite packages conflict

I have plumber version 1.0.0 installed and I also installed jsonlite 1.7.1 when I try to load library(jsonlite) I get back: Error in value[[3L]](cond) : Package ‘jsonlite’ version 1.6 cannot be unloaded: Error in unloadNamespace(package) :…
user1700890
  • 7,144
  • 18
  • 87
  • 183
0
votes
2 answers

R plumber getting as excel (xlsx)

I want to return or download excel for post response in plumber using R I'm reading data frame and writing to xlsx: FileName: sample.R xlsx_df = read.xlsx(file="My_File.xlsx", sheetName="Overview", header=T, stringsAsFactors=F,…
Zakir Hussain
  • 359
  • 2
  • 13
0
votes
1 answer

empty queue in google cloud run with plumber R api

Is it possible to empty the queue of tasks on google cloud run where I run a plumber API? I will get a lot of pushes in a batch, but I just want to run the script once. So the best solution would be to delete the post requests waiting in the queue…
0
votes
0 answers

How to build database connection in HTTP Request

I'm trying to build an HTTP API (using R/plumber). One feature I'd like is for the user to make a GET request and then return some data depending on the factors they'd like data for. However, querying the data requires me to build an odbc database…
lmeninato
  • 462
  • 4
  • 12
0
votes
0 answers

Error in if (swagger) { :argument is not interpretable as logical

I am new using plumber, and I'm using the Democratizing R with Plumber APIs - James Blair conference material. I am using the following material available on github Cars Model API, but running the entrypoint.R script, I get the following error. How…
Rafael Díaz
  • 2,134
  • 2
  • 16
  • 32
0
votes
1 answer

R plumber return error and object from env in response payload

I'm currently building an API service in R using plumber. I was wondering if a function within my app errors out, is there a way to tryCatch it in such a way that I can return both the error itself and an object that exists in the environment at the…
Jonathan Rauscher
  • 147
  • 1
  • 1
  • 15
0
votes
1 answer

Persisted R Model exposed as Web Service returns wrong answer

I am cutting my teeth on exposing an R machine learning classification model as a web service using Plumber and Swagger. I have trained a model and saved it as "j48.model.rda". I am now loading the model in a file called "myFile.R". This file…
Fritz45
  • 752
  • 1
  • 10
  • 23
0
votes
1 answer

How to send curl variables to plumber function dynamically?

I want to dynamically call the plumber API based on any number of input variables. I need to map the curl input to the input of a function name. For example if the function has an input hi then, curl -s --data 'hi=2' means that hi=2 should be passed…
Matt Elgazar
  • 707
  • 1
  • 8
  • 21
0
votes
1 answer

How to do the plumber::plumb(file = 'mypath') in httr?

I am struggling to find a solution that httr can do the same thing as plumber in R. In plumber here's the code that works: 1). Create a script hello_world_plumber.R #' @post /hello_world hi <- function(name) { return(paste0('Hello ', name,…
Matt Elgazar
  • 707
  • 1
  • 8
  • 21
0
votes
1 answer

Is plumbr secure?

The way I understand it is that plumbr allows you to turn any R script into an API end point. You can send requests to the API end point and it will return the output that you define in the R script. Let's assume that I host the script in a Docker…
Cauder
  • 2,157
  • 4
  • 30
  • 69