astamm / nloptr

nloptr provides an R interface to NLopt, a free/open-source library for nonlinear optimization providing a common interface to a number of different optimization routines which can handle nonlinear constraints and lower and upper bounds for the controls.
https://astamm.github.io/nloptr/
Other
105 stars 35 forks source link

Deal with NA returns from detectCores #150

Closed jeroen closed 5 months ago

jeroen commented 8 months ago

parallel::detectCores() may return NA in cases that it fails to guess. In those cases we want to use the default.

> min(2,NA)
# [1] NA
> min(2,NA, na.rm=TRUE)
#  [1] 2
aadler commented 7 months ago

@astamm This should be merged.

aadler commented 5 months ago

Nudge, nudge @astamm :)

astamm commented 5 months ago

Thanks!