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

future_tapply(): Creation of error on 'INDEX' being a formula only working in R (>= 4.3.0) would fail in R (< 3.6.0) #117

Closed HenrikBengtsson closed 11 months ago

HenrikBengtsson commented 11 months ago

R CMD check --as-cran with R 3.5.0 (sic!) reveals:

 * checking R code for possible problems ... NOTE
.formula2varlist: no visible global function definition for
  ‘errorCondition’
  (/home/runner/work/future.apply/future.apply/check/future.apply.Rcheck/00_pkg_src/future.apply/R/future_tapply.R:86)
Undefined global functions or variables:
  errorCondition

This is because errorCondition() was introduced in R 3.6.0. This bug would only reveal itself when an R version assertion would fail, so not a biggie;

.formula2varlist <- import_base(".formula2varlist", default = function(...) {
  stop(errorCondition("future_tapply(X, INDEX, ...), where 'INDEX' is a formula, requires R (>= 4.3.0"), class = "NotSupportedByThisRVersionError")
})
HenrikBengtsson commented 11 months ago

Fix in commit dd99ef47.