Open ADorosz5 opened 2 years ago
@cbeleites, is it enough information for you to reproduce the error? Could a reproducible example be added to this thread?
@GegznaV yes, it's good for me. I think I know the reason of the problem, and I'll be able to construct also unit test data.
We found it as part of a course, and ran into the other issue #68 about dput()
when trying to add a reproducible example - otherwise there would have been one....
@cbeleites, this issue has the status "Urgent": would you have time to try solving this issue ASAP? Otherwise wouldn't it be better to use a lower level of priority?
1) This issue is not solved for 3 years, so it is not urgent. 2) This issue lacks a reprex, so I'll try to create it myself. @cbeleites and @ADorosz5, please, confirm that the reprex shows the essence of the issue:
suppressPackageStartupMessages({
library(hyperSpec)
})
spectra_CHstretch <- flu[,, 450 ~ 495]
baseline <- spc_fit_poly_below(spectra_CHstretch, poly.order = 6)
#> Error in qr.solve(vdm[use, ], y[use, i]): singular matrix 'a' in solve
Created on 2024-05-02 with reprex v2.1.0
spectra_CHstretch <- spectra[,, 2600 ~ 3150] plot (spectra_CHstretch) baseline <- spc.fit.poly.below(spectra_CHstretch, poly.order = 6)