Skip to content

Warning message when two identical intensities appear in the region where to search minima/maxima #1

Description

@henningte

There is a rare case causing warning messages of the form:

Warning message: In (index.min - min(m, index.min - 1)):(index.min + min(m, nrow(region) - : numerical expression has 2 elements: only the first used

if a spectrum has two identical intensity values in the region where the script searches for minima (and I suspect it would also appear for maxima). @frank-m-wang reported this issue to me (henningte/irpeat#1).

A possible solution would be to add [[1]] to the end of lines 84 and 119 in FTIRbaselines.R which lets the function pick always the first minimum/maximum it detects.

I didn't test it yet, but would like to update this in irpeat, too (or like to ask you to do so), if you'll add this change to your repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions