startDynamicHelp
Start the HTML Help System

Description

Starts or stops the dynamic HTTP help server.

Usage

startDynamicHelp(start = TRUE)

Arguments

start a logical value. If TRUE (the default), starts the dynamic HTTP help server. If FALSE, stops the dynamic HTTP help server. If NA and the help server is not already running, it starts the help server.

Details

When the dynamic HTTP help server is started, it binds to the localhost interface (that is, it is accessible only from the local machine). The help server uses the first available port listed in the system option help.ports, or it uses a random integer between in 10000 and 32000 if this system option value is NULL. (The port number is stored in the tools namespace, hidden in the object httpdPort. The URL at which the dynamic HTTP help server can be accessed is also stored in the tools namespace, in the object httpdUrl.)
If startDynamicHelp returns -1 as the port number and displays a text warning, check whether the system environment variable SNEXT_DISABLE_RDHTTPD is set to a non-empty string, which disables the dynamic HTTP help server.
An attempt to start a running dynamic HTTP help server, or to stop a non-running dynamic HTTP help server, causes the function to stop with an error message.
Value
returns the invisible port number of HTTP dynamic help server. See Details for more information.
0specifies that the HTTP server is stopped.
-1specifies an error or warning has occurred.
any other positive integerspecifies the port number of a started HTTP dynamic help server.
Differences between Spotfire Enterprise Runtime for R and Open-source R
See Also
help.start
Examples
## Not run: 
require(tools)
httpd.port <- startDynamicHelp(TRUE)
# starting httpd help server ... done
httpd.port
identical(tools:::httpdPort, httpd.port)  # Returns: TRUE

startDynamicHelp() # Error: server already running

startDynamicHelp(FALSE) tools:::httpdPort # Should be 0

options(help.ports = 12345) ret <- startDynamicHelp() ret # Should be 12345 startDynamicHelp(FALSE)

Sys.setenv(SNEXT_DISABLE_RDHTTPD = "yes") startDynamicHelp() # Warning in startDynamicHelp() : # httpd server disabled by SNEXT_DISABLE_RDHTTPD # [1] -1 ## End(Not run)

Package tools version 6.1.1-7
Package Index