Skip to content

Error when undertaking a forecast with zero F #56

@pdolder

Description

@pdolder

Hi,

the stockasssessment::forecast function now returns a summary tables with quantiles for a stochastic forecast but this causes an error if you're projecting a stock with zero catch advice in any year, i.e.

forecast(fit, fval = c(0.8,0.6,0,0.2), ave.years=2017:2019, rec.years=2005:2019, splitLD=TRUE, nosim = 50001)

Error in quantile.default(x, c(0.5, 0.025, 0.975)) :
missing values and NaN's not allowed if 'na.rm' is FALSE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions