mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
150 stars 51 forks source link

Clearer error/warnings messages in `tune.spca()` #275

Closed Max-Bladen closed 1 year ago

Max-Bladen commented 1 year ago

Is your feature request related to a problem? Please describe. Users are repeatedly encountering the following error:

Error: Unexpected error while trying to choose the optimum number of components. Please check the inputs and if problem persists submit an issue to https://github.com/mixOmicsTeam/mixOmics/issues

This is really not helpful at all as it is so ambiguous. One user in particular encountered this when applying tune.spca() on a dataset with a few NAs.

Describe the solution you'd like A clearer warning/error message detailing exactly what's caused the function to stop.

Describe alternatives you've considered Two primary alternatives:

Will likely go for the second option as it allows NAs to be handled, but users will be made aware of the risks associated with this.