bfast icon indicating copy to clipboard operation
bfast copied to clipboard

Error in if (is.nan(p0) || p0 < a2 || p0 > (1 - a2)) {: missing value where TRUE/FALSE needed

Open GreatEmerald opened this issue 5 years ago • 0 comments

Equivalent of https://github.com/bfast2/strucchange/issues/18 in bfast01, with a trivial reproducer:

library(bfast)
bfast01(data = Nile)
#> Error in if (is.nan(p0) || p0 < a2 || p0 > (1 - a2)) {: missing value where TRUE/FALSE needed

Created on 2020-03-27 by the reprex package (v0.3.0)

Blame: https://github.com/bfast2/bfast/blob/f58ba97a3dc2b98ea06f265a10f81c19c823c323/R/bfast01.R#L462

But really should just depend on strucchange to not duplicate code.

GreatEmerald avatar Mar 27 '20 18:03 GreatEmerald