new_app | R Documentation |
An experimental function to create a local web application based on R's
internal httpd
server (which is primarily for running R's dynamic help
system).
new_app(name, handler, open = interactive(), ports = 4321 + 1:10)
name |
The app name (a character string, and each app should have a unique name). |
handler |
A function that takes the HTTP request information (the first argument is the requested path) and returns a response. |
open |
Whether to open the app, or a function to open the app URL. |
ports |
A vector of ports to try for starting the server. |
The app URL of the form http://127.0.0.1:port/custom/name/
.
This function is not based on base R's public API, and is possible to break in the future, which is also why the documentation here is terse. Please avoid creating public-facing web apps with it. You may consider packages like httpuv and Rserve for production web apps.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.