来自help(startDynamicHelp):
细节:
Run Code Online (Sandbox Code Playgroud)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")适当设置来覆盖它.随机化似乎是一个特征.