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 named plumber.R
that returns a plumb
object. So I have the file plumber.R
in the directory as:
library(plumber)
plumber::plumb("testAPI.R")
And then calling rsconnect::deployAPI()
on the directory...
It deploys with no errors but seems to have not found the handler: screenshot of the swagger page