Closed Deleetdk closed 7 years ago
There's a lot to be improved regarding tests in my package. I do confirm that the code produces warnings, but I didn't really care about them because they are harmless.
Also, great tip about inherits
.
I now used inherits()
and select_forecast()
does not return warnings anymore. Thank you very much, I learned something new today!
Running the example command produces warnings:
These are due to a bad test for whether the fit produced an error. Don't use
class(x) == "str"
. Useinherits(x, "str")
. Example:In this particular case, there is no trouble with the class approach because the error only has 1 class. However, in your code, the errors have >1 class and that's why you get the warning. Only the first is used by the
if
statement.