list(
"/ping" = function(...) "pong"
, "/predict" = function(p, q) {
list(
result = predict(
linear.model,
newdata = data.frame(x = as.numeric(q$x))
)[[1]]
)
}
, function(...) list(exception = "catch all route")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.