Skip to content

optim_safe does not say enough when an error happens #108

Description

@alexgenin

Distribution-fitting is done using optim_safe() (in https://github.com/spatial-ews/spatialwarnings/blob/master/R/fitpsd.R#L24), which is there to catch errors when the optimization goes into undefined ranges, among other things. However, it tends to hide errors that are meaningful and are not due to convergence issues, e.g. today after an upgrade:

Error in dyn.load(file, DLLpath = DLLpath, ...) : \n  unable to load shared object '/home/alex/R/x86_64-pc-linux-gnu-library/4.1/gsl/libs/gsl.so':\n  libgsl.so.25: cannot open shared object file: No such file or directory\n

In those cases, it will return NA/NaN-like objects for no good reason. There should be a way to stop when those errors occur (or at least show a warning), and not hide them as if they were convergence-related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions