Open cbeleites opened 3 years ago
vanderMonde()
should be renamed - if only because I misspelled the name (thinking it was Dutch van der Monde when it is French Vandermonde).
I propose to rename it into poly()
, make that generic and extend the functionality to provide orthogonal polynomials:
vanderMonde()
calculates so-called raw polynomials, either directly on the wl()
of a hyperSpec object or on some rescaled version of it.stats::poly()
calculates by default orthogonal polynomials, but can be used to calculate raw polynomials as well (via raw = TRUE
)vanderMonde()
I have is setting up polynomial terms for EMSC, and for that orthogonal polynomials are better than raw polynomials or polynomials with the wavelength scaled to [0, 1] or [-1, 1].poly()
is that I'd like to include an offset (degree 0) term.
This is old issue https://github.com/cbeleites/hyperSpec/issues/339