我希望使用parallel::makePSOCKcluster(..., outfile = "")显示工作进程的输出,还希望隐藏“起始工作进程”消息。这个是可能的吗?目前,我得到:
> library(parallel)
> sink("/dev/null")
> cluster = makePSOCKcluster(4, outfile = "")
starting worker pid=6695 on localhost:11111 at 17:31:50.015
starting worker pid=6703 on localhost:11111 at 17:31:50.240
starting worker pid=6711 on localhost:11111 at 17:31:50.467
starting worker pid=6724 on localhost:11111 at 17:31:50.698发布于 2017-03-16 22:17:56
不,如果不修改parallel包,就不可能避免这些消息。.slaveRSOCK函数始终使用cat显示该消息,因此如果您指定outfile="",您将始终看到这些消息。
https://stackoverflow.com/questions/42821130
复制相似问题