Skip to content
Prev 383697 / 398502 Next

Possible bug in optimize (related to naming the arguments)

Dear all,

I am wondering if there is a minor bug in the optimimize function; please see below:


---
$minimum
[1] 0.3333333

$objective
[1] 0
$minimum
[1] 0.3333333

$objective
[1] 0
Error in optimize(f3, c(0, 1), tol = 1e-04, i = 1/3) :
  'xmin' not less than 'xmax'
$minimum
[1] 0.3333333

$objective
[1] 0
Error in f(arg, ...) (from #1) : argument "i" is missing, with no default
$minimum
[1] 0.3333333

$objective
[1] 0
$minimum
[1] 0.3333333

$objective
[1] 0

---

the problem is, I guess, due to the keyword 'interval' gets mixed
up with 'i'.

Has anyone experienced that?

Best regards
S?ren