Skip to content

Rename 'vanderMonde()' #4

Open

Description

@cbeleites

This is old issue cbeleites/hyperSpec#339

Activity

  1. cbeleites commented on Jul 15, 2021

    @cbeleites
    CollaboratorAuthor

    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)
    • The most important use of 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].
    • The one thing I'd rather have different from the default behaviour of poly() is that I'd like to include an offset (degree 0) term.
  2. added this to the 1.0 CRAN submission milestone on Jul 15, 2021
  3. self-assigned this
    on Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions