rstudio - is it possible to run a code in the background

前端 未结 4 1281
无人及你
无人及你 2021-02-03 23:09

Question regarding RStudio. Suppose I am running a code in the console:

> code1()

assume that code1() prints nothing on the con

4条回答
  •  忘掉有多难
    2021-02-03 23:55

    The mcparallel() function in the parallel package will do the trick, if you are on Linux, that is ...

    library(parallel)
    Job1 = mcparallel(code1())
    JobResult1 = mccollect(Job1)
    

提交回复
热议问题