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
106 stars 34 forks source link

Deal with NA returns from detectCores #150

Closed jeroen closed 7 months ago

jeroen commented 10 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 9 months ago

@astamm This should be merged.

aadler commented 7 months ago

Nudge, nudge @astamm :)

astamm commented 7 months ago

Thanks!