This repo shows a simple example of how to create an API using RestRserve package.
First of all, it is necessary install RestRserve package and others complementary packages, in this way:
# package to create an API
install.packages("RestRserve")
# complementary packages
install.packages(c("jsonlite", "dplyr", "tidyselect"))
After that, you can just execute the script via bash, just like that:
Rscript app.R
Just make a fork in this repo and send me a Pull Request.