From tom@@@k@||ber@ @end|ng |rom gm@||@com  Thu May  2 19:24:25 2019
From: tom@@@k@||ber@ @end|ng |rom gm@||@com (Tomas Kalibera)
Date: Thu, 2 May 2019 19:24:25 +0200
Subject: [Rd] mccollect with NULL in R 3.6
In-Reply-To: <CAPvvxJUCYQ_404NN=Oor0cGQveN+CzP_oS2sOsvZtgtua=SZZw@mail.gmail.com>
References: <CAPvvxJUCYQ_404NN=Oor0cGQveN+CzP_oS2sOsvZtgtua=SZZw@mail.gmail.com>
Message-ID: <2ce32c00-d99c-227e-8b2e-c06dc1e7a21d@gmail.com>

On 5/1/19 12:25 AM, Gergely Dar?czi wrote:
> Dear All,
>
> I'm running into issues with calling mccollect on a list containing NULL
> using R 3.6 (this used to work in 3.5.3):
>
> jobs <- lapply(
>      list(NULL, 'foobar'),
>      function(x) mcparallel(identity(x)))
> mccollect(jobs, wait = FALSE, timeout = 0)
> #> Error in names(res) <- pnames[match(s, pids)] :
> #>   'names' attribute [2] must be the same length as the vector [1]
>
> Note, setting a "name" for the jobs does not help, but the above works with
> "wait=TRUE", and also if I change the order of NULL and "foobar", although
> in that case, the second value (NULL) is ommitted.  It also works with
> mclapply fine.
>
> Any ideas/suggestion on how to get mccollect work with the above example?.

NULL is not a valid job identification. Perhaps mccollect() could give a 
clearer error message, but I don't see, given its documentation, what 
else than throwing an error it should do. What is the problem you were 
trying to solve?

Best
Tomas

>
> Thanks,
> Gergely
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] mccollect with NULL in R 3.6
Tomas Kalibera