futureverse / future.apply

:rocket: R package: future.apply - Apply Function to Elements in Parallel using Futures
https://future.apply.futureverse.org
211 stars 16 forks source link

Incorporate R-devel bug fix PR#17969 #69

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

From PR#17969 - Wishlist: 'simplify2array' to handle zero-length list.

R-devel commit: https://github.com/wch/r-source/commit/14ff49502cc675175792addb3a28e2b7717f5717 (2020-11-18)

HenrikBengtsson commented 3 years ago

Turns out there's nothing to do here; the reason for all the updates from:

  if (!isFALSE(simplify) && length(answer))
    simplify2array(answer, higher = (simplify == "array"))
  else
    answer

to

  if (!isFALSE(simplify))
    simplify2array(answer, higher = (simplify == "array"))
  else
    answer

is that in R-devel, base::simplify2array(answer, ...) will return answer immediately if length(answer) == 0. Thus, the only update in R-devel is to base::simplify2array(). All the other updates in parallel are just clean up of code but no changes to what is returned.