The R Project SVN R

Rev

Rev 84750 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
49405 ripley 1
% File src/library/tools/man/startDynamicHelp.Rd
68948 ripley 2
% Part of the R package, https://www.R-project.org
88636 kalibera 3
% Copyright 2009-2025 R Core Team
49405 ripley 4
% Distributed under GPL 2 or later
5
 
6
\name{startDynamicHelp}
56186 murdoch 7
\alias{startDynamicHelp}
50151 murdoch 8
\alias{help.ports}
66794 ripley 9
\alias{R_DISABLE_HTTPD}
10
 
49507 ripley 11
\title{Start the Dynamic HTML Help System}
49405 ripley 12
\description{
49434 ripley 13
  This function starts the internal help server, so that HTML help pages
14
  are rendered when requested.
49405 ripley 15
}
16
\usage{
61160 ripley 17
startDynamicHelp(start = TRUE)
49405 ripley 18
}
49410 murdoch 19
\arguments{
49434 ripley 20
  \item{start}{logical: whether to start or shut down the dynamic help
67562 hornik 21
    system.  If \code{NA}, the server is started if not already running.}
49412 ripley 22
}
49405 ripley 23
\details{
50256 ripley 24
  This function starts the internal HTTP server, which runs on the
84750 hornik 25
  loopback interface (\samp{127.0.0.1}).  If \code{options("help.ports")}
68414 murdoch 26
  is set to a vector of non-zero integer values, \code{startDynamicHelp} will try
50256 ripley 27
  those ports in order; otherwise, it tries up to 10 random ports to
28
  find one not in use.  It can be disabled by setting the environment
68414 murdoch 29
  variable \env{R_DISABLE_HTTPD} to a non-empty value or \code{options("help.ports")}
88636 kalibera 30
  to \code{0}.  If the server could not be started (including when disabled by
31
  the environment variable), it is permanently disabled for the rest of the
32
  R session.
61433 ripley 33
 
50151 murdoch 34
  \code{startDynamicHelp} is called by functions that need to use the
35
  server, so would rarely be called directly by a user.
49410 murdoch 36
 
61160 ripley 37
  Note that \code{options(help_type = "html")} must be set to actually
38
  make use of HTML help, although it might be the default for an \R
39
  installation.
49507 ripley 40
 
41
  If the server cannot be started or is disabled,
42
  \code{\link{help.start}} will be unavailable and requests for HTML
43
  help will give text help (with a warning).
50256 ripley 44
 
45
  The browser in use does need to be able to connect to the loopback
46
  interface: occasionally it is set to use a proxy for HTTP on all
47
  interfaces, which will not work -- the solution is to add an exception
84750 hornik 48
  for \samp{127.0.0.1}.
49405 ripley 49
}
50
\value{
49434 ripley 51
  The chosen port number is returned invisibly (which will be \code{0}
52
  if the server has been stopped).
49405 ripley 53
}
54
\seealso{
49507 ripley 55
  \code{\link{help.start}} and \code{\link{help}(help_type = "html")}
56
  will attempt to start the HTTP server if required
61433 ripley 57
 
49434 ripley 58
  \code{\link{Rd2HTML}} is used to render the package help pages.
49405 ripley 59
}
60
\keyword{ documentation }