| new_app | R Documentation |
Create a local web application based on R's internal httpd.
new_app(name, handler, open = interactive(), host = "127.0.0.1", port = NULL)
stop_app(name = names(.proxy$apps))
name |
App name (a character string). Use |
handler |
A function with signature |
open |
Whether to open the app URL in a browser, or a function to open
it. In non-interactive sessions this also controls whether the call
blocks: passing |
host |
Bind address for the proxy ( |
port |
Candidate proxy ports when |
new_app() has two modes:
name = '': start an app behind a lightweight proxy at
http://host:PORT/, forwarding to R's internal httpd path
/custom/xfun:PORT/.
name != '': register a legacy app directly on R's internal httpd at
http://127.0.0.1:BACKEND/custom/name/ (compatible with older versions).
stop_app() deregisters one or more running apps.
new_app() returns the app URL invisibly. stop_app() returns
nothing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.