You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an R code that connects with an API, gets content in the form of a table, and I transform that data, and modify, create columns, add filters, bind it with other content, and another table is produced towards the end. I am hoping to convert my code into an API and go further from there. I tried the Get method, and I keep failing. Since I can not paste the whole code, I am going share a summary of that code. Please try and help me out.
segment<- NULL #this has to be a variable for the API Get/Post
toCall<- APIfunction("api credentials", segment) # my api to retrieve data, which currently works
df<- as.data.frame.list(toCall)
#This followed by some lines to transform data, remove unwanted columns/rows etc
#input from the above dataframe goes into the check function below
CheckFunction<- function1
CorrectFunction<- function2 #takes input from above function
rbind.results
structure the output
print(head(output))
I tried to write a Get query and call the final output and I get a 404 error.
I know this is not much to go with, but my hands are tied. Please help! Thank you!
The text was updated successfully, but these errors were encountered:
You have not added any code related to plumber. Suppose you want to make a get request to http://localhost:port/myoutput you would need something like:
#* @get /myoutput
myfunction <- function() {
[... all your code ..]
return(output)
}
Did you write a working function and have you added the plumber decorator? The documentation for this package is very good and has great examples. I would suggest you read through that again.
Hi. I'd need a plumber file that reproduces the example. No worries if you can't share the full code but I'd need something to work off of in order to debug.
Closing for now but we can reopen if you're able to repro in something that you can share.
Hi,
I have an R code that connects with an API, gets content in the form of a table, and I transform that data, and modify, create columns, add filters, bind it with other content, and another table is produced towards the end. I am hoping to convert my code into an API and go further from there. I tried the Get method, and I keep failing. Since I can not paste the whole code, I am going share a summary of that code. Please try and help me out.
I tried to write a Get query and call the final output and I get a 404 error.
I know this is not much to go with, but my hands are tied. Please help! Thank you!
The text was updated successfully, but these errors were encountered: