Plumber allows you to create a web API by merely decorating your existing R source code with roxygen2-like comments. Take a look at an example. # plumber.R #* Echo back the input #* @param msg The message to echo #* @get /echo function(msg="") { list(msg = paste0("The message is: '", msg, "'")) } #* Plot a histogram #* @serializer png #* @get /plot function() { rand <- rnorm(100) hist(rand) } #* R