Closed HenrikBengtsson closed 1 year ago
I just noticed:
https://github.com/Bioconductor/BiocParallel/blob/4a48a7eb2ac11d9d08589b1926eff35242d472f6/R/DoparParam-class.R#L21-L28
This checks if foreach is attached, and if not, then it's loaded. Can that be replaced for a check if the package is loaded, i.e.
if (!"foreach" %in% loadedNamespaces()) { ... }
?
Oh, looking at the rest of the code, I think:
if (!requireNamespace("foreach", quietly = TRUE)) { stop("DoparParam() requires the 'foreach' package") }
is what you want here.
I just noticed:
https://github.com/Bioconductor/BiocParallel/blob/4a48a7eb2ac11d9d08589b1926eff35242d472f6/R/DoparParam-class.R#L21-L28
This checks if foreach is attached, and if not, then it's loaded. Can that be replaced for a check if the package is loaded, i.e.
?