嗯,标题很明显......是否可以为R的HTML帮助设置默认端口号?每次我启动HTML帮助时,端口号都会改变。
答案 0 :(得分:5)
来自help(startDynamicHelp)
:
详细说明:
This function starts the internal HTTP server, which runs on the loopback interface (‘127.0.0.1’). If ‘options("help.ports")’ is set to a vector of integer values, ‘startDynamicHelp’ will try those ports in order; otherwise, it tries up to 10 random ports to find one not in use. It can be disabled by setting the environment variable ‘R_DISABLE_HTTPD’ to a non-empty value.
所以看起来您可以尝试通过options("help.ports")
覆盖它,并进行适当的设置。随机化似乎是一个特征。