bfast icon indicating copy to clipboard operation
bfast copied to clipboard

bfast01: stl="both" results in an empty formula

Open GreatEmerald opened this issue 6 years ago • 0 comments

Running bfast01(stl="both") always results in an error:

library(bfast)
mts = ts(1:10, 2000, 2011, frequency=20)
bfast01(mts, stl="both")
#> Error in parse(text = x, keep.source = FALSE): <text>:2:0: unexpected end of input
#> 1: response ~ 
#>    ^

Created on 2019-12-04 by the reprex package (v0.2.0).

This is because the corresponding component is removed from the formula, and "both" removes both of them, resulting in an empty formula.

I don't know what the fix should be: either not allow passing "both", or perhaps not filter the components out.

GreatEmerald avatar Dec 04 '19 19:12 GreatEmerald