Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/rook.analysis.page.server.R
Start a new Rook AnalysisPage server. This is a convenience
wrapper around new.rook.analysis.page.app
which builds the Rook App and then also makes a Rook server (Rhttpd
object)
which just contains the one App. It then starts the server in a fork and returns the PID
of the child process.
1 2 3 | startRookAnalysisPageServer(reg, tmpdir = tempdir(), ...,
app = new.rook.analysis.page.app(reg, tmpdir = tmpdir, app.name = app.name,
...), app.name = "RAPS", port = 5000)
|
reg |
AnalysisPageRegistry from which to build application. Passed through to |
tmpdir |
Directory for temporary files. Passed through to |
... |
Passed through to |
app |
Rook App to put into the server. Default: |
app.name |
Name for App within server, default "RAPS" (for Rook AnalysisPageServer). This will determine the second part of the URL, for example "/custom/RAPS". |
port |
Port on which to start listening. |
list with two componenets:
$url
URL to base of application
$pid
Process ID of server
This function used to be called start.rook.analysis.page.server
but that
led to an R CMD check warning about S3 method inconsistency.
Brad Friedman
new.rook.analysis.page.app
, kill.process
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
registry <- AnalysisPageServer:::trig.registry()
server <- startRookAnalysisPageServer(registry, port = 5102)
## do some stuff
## For example
landing.page.url <- rook.analysis.page.server.landing.page(server)
## now go to your web browser and open landing.page.url
## Or maybe something in this R process. See what the pages are
pages.url <- file.path(server$url, "R", "pages")
pages <- fromJSON(readLines(pages.url, warn = FALSE))
sapply(pages, "[[", "name")
## Kill the server
kill.process(server)
## End(Not run)
message("See vignette ExamplesServers.html")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.